
Vue.component2('a_1_0_0_0_0', {  
    template: `
        <div class="a_1_0_0_0_0_dir"ref="div" :key="refresh">
            <slot></slot>
        </div>
`,  
  data() {
      return {
        now_select:"-1",
        refresh:"1",/*用来刷新组件*/
        data:{
            show_flag:true,
        height:'35px',
        width:"",
            //目录结构:
            /*
           menus: {
                'menu_id':{//目录id
                    "menu_name":"目录名称",
                    "menu_fast":"快捷键",
                    "item_fast":[],//快速搜索目录
                    "item_dct":{//目录中的选项
                        "item_id":{//选项id
                        "item_fast":"快捷键",
                            "item_name":"选项名称",
                            "callback":"选项回调函数"
                        }

                    }
                }
            },
            */
            menus: {

        },
        fast_menu:[],//存放menus ids的数组 ids被转为整数 按照sort顺序排列
        show_flag:{}
        }
         
      };
  },
  watch:{
    'data.show_flag':function(e){
        let _this=this;
        _this.$nextTick(() => {
            if(e){
                _this.$refs.div.style.display=_this.old_display;
            }else{
                _this.old_display=_this.$refs.div.style.display;
                _this.$refs.div.style.display='none';
            }
      }); 
    }
  },
  mounted:function(){
    _this.data.change_height=function(val){
        _this.data.height=val;
        console.log("修改高度",_this.data.var_name,val)
        _this.$nextTick(() => {
       _this.$refs.div.style.height = _this.data.height;
      }); 
    }
    _this.data.change_width=function(val){
        _this.data.width=val;
        console.log("修改宽度",_this.data.var_name,val)
        _this.$nextTick(() => {
       _this.$refs.div.style.width = _this.data.width;
      }); 
    }
       
  }
} 
);



Vue.component2('a_1_0_0_1_0', {  
    template: `
        <div class="a_1_0_0_1_0_dir" ref="div":key="refresh" :style="'width='+data.width">
            <slot></slot>
        </div>
`,  
  data() {
      return {
        now_select:"-1",
        refresh:"1",/*用来刷新组件*/
        data:{width:"20%",
            height:"0",
        }
         
      };
  },
  mounted:function(){
    //c
    _this.change_height=function(){
       _this.$refs.div.style.height = _this.data.height;
    }
    //当页面尺寸修改,更改当前高度
    _this.data.change_size=function(obj){
        // console.log("??,o",obj)
        let height=obj.height;
        _this.data.height=(height-70)+'px';
        // console.log("now_height:", _this.data.height)
        ttime3(_this,'div',_this.change_height)
    }
       
  }
} 
);



Vue.component2('a_1_0_0_2_0', {  
    template: `
        <div class="a_1_0_0_2_0_dir" ref="div":key="refresh" :style="'width='+data.width">
            <slot></slot>
        </div>
`,  
  data() {
      return {
        now_select:"-1",
        refresh:"1",/*用来刷新组件*/
        data:{width:"80%",
            height:"0",show_flag:true
        }
         
      };
  },
  watch:{
    'data.show_flag':function(e){
      let _this=this;
        _this.$nextTick(() => {
            if(e){
                _this.$refs.div.style.display=_this.old_display;
            }else{
                _this.old_display=_this.$refs.div.style.display;
                _this.$refs.div.style.display='none';
            }
      }); 
    }
  },
  mounted:function(){
    
    _this.data.change_height=function(val){
      _this.data.height=val;
      _this.$nextTick(() => {
     _this.$refs.div.style.height = _this.data.height;
    }); 
  }
  _this.data.change_width=function(val){
      _this.data.width=val;
      _this.$nextTick(() => {
     _this.$refs.div.style.width = _this.data.width;
    }); 
  }
       
  }
} 
);



Vue.component2('a_1_0_0_3_1', {  
    template: `
        <div class="a_1_0_0_3_1_dir"ref="div" v-if="show_flag":key="refresh" :style="lefttop"
        >
        <div class="a_1_0_0_3_1_title">
            <span  class="a_1_0_0_3_1_left icon iconfont icon-yidong"
        @mousedown="mouse_down1"
            ></span>
            <span class="a_1_0_0_3_1_center">浮动属性编辑框</span>
            <span :class="{
            'a_1_0_0_3_1_right':data.true,
            
            'icon iconfont icon-fangda':!slot_flag,'icon iconfont icon-suoxiao':slot_flag,}"@click="slot_show"></span>
        </div>

        <div v-show="slot_flag">
            <slot></slot>
        </div>
            
        </div>
`,  
  data() {
      return {
        show_flag:true,
        lefttop:"right:15px;",
        now_select:"-1",
        refresh:"1",/*用来刷新组件*/
        slot_flag:true,
        data:{
        true:true,
        height:'35px',
            //目录结构:
            /*
           menus: {
                'menu_id':{//目录id
                    "menu_name":"目录名称",
                    "menu_fast":"快捷键",
                    "item_fast":[],//快速搜索目录
                    "item_dct":{//目录中的选项
                        "item_id":{//选项id
                        "item_fast":"快捷键",
                            "item_name":"选项名称",
                            "callback":"选项回调函数"
                        }

                    }
                }
            },
            */
            menus: {

        },
        fast_menu:[],//存放menus ids的数组 ids被转为整数 按照sort顺序排列
        show_flag:{}
        }
         
      };
  },
  methods:{

    slot_show:function(){
        this.slot_flag=this.slot_flag==true?false:true;
    },
    绘制移动:function(event){
        let data=this.data.全局鼠标操作对象1.get_data({key:"移动浮动属性编辑框"});
        this.lefttop=`left:${data.x+(event.clientX-data.startx)};top:${data.y+(event.clientY-data.starty)};`
    },
    停止移动:function(event){
        this.data.全局鼠标操作对象1.unset_move({
            key:"移动浮动属性编辑框",
            key2:"移动浮动属性编辑框move",});
            this.data.全局鼠标操作对象1.unset_up({
                key:"移动浮动属性编辑框",
                key2:"移动浮动属性编辑框up",});
    },
    mouse_down1:function(event){
        let dom=this.$refs.div;
        let rect=dom.getBoundingClientRect();
        let x=rect.left;
        let y=rect.top;
        this.data.全局鼠标操作对象1.set_data({
            key:"移动浮动属性编辑框",
            data:{x:x,y:y,
                startx:event.clientX,
                starty:event.clientY
            }
        });
  
  
          this.data.全局鼠标操作对象1.set_move({
            key:"移动浮动属性编辑框",
            key2:"移动浮动属性编辑框move",
            func:this.绘制移动,
        });
        this.data.全局鼠标操作对象1.set_up({
            key:"移动浮动属性编辑框",
            key2:"移动浮动属性编辑框up",
            func:this.停止移动,
        });
  
          event.stopPropagation();
      },
  },
  mounted:function(){
       
  }
} 
);



Vue.component2('a_1_0_1_0_0', {  
    template: `
        <div class="a_1_0_1_0_0_menu_bar" :key="refresh" :style="'width:'+data.width">
            <div class="a_1_0_1_0_0_menu_item" v-for="(menu_id, index) in data.fast_menu"  @mouseover="showSubMenu(menu_id)" @mouseleave="hideSubMenu(menu_id)">
                {{ data.menus[menu_id].menu_name }}
                <div class="a_1_0_1_0_0_sub_menu" v-show="data.show_flag[menu_id]&&now_select==menu_id">
                    <div class="a_1_0_1_0_0_sub_menu_item" v-for="(item_id,index2) in data.menus[menu_id].item_fast" :key="menu_id+'_'+item_id" @click="handleClick(menu_id,item_id)">
                        {{ data.menus[menu_id].item_dct[item_id].item_name }}
                    </div>
                </div>
            </div>
        </div>
`,  
  data() {
      return {
        now_select:"-1",
        refresh:"1",/*用来刷新组件*/
        data:{
            width:"20%",
            //目录结构:
            /*
           menus: {
                'menu_id':{//目录id
                    "menu_name":"目录名称",
                    "menu_fast":"快捷键",
                    "item_fast":[],//快速搜索目录
                    "item_dct":{//目录中的选项
                        "item_id":{//选项id
                        "item_fast":"快捷键",
                            "item_name":"选项名称",
                            "callback":"选项回调函数"
                        }

                    }
                }
            },
            */
            menus: {

        },
        fast_menu:[],//存放menus ids的数组 ids被转为整数 按照sort顺序排列
        show_flag:{}
        }
         
      };
  },
  methods: {
      showSubMenu(menu_id) {
          this.data.menus[menu_id].showSubMenu = true;
          if (!this.data.show_flag[menu_id]){
            this.now_select=menu_id;
            this.data.show_flag[menu_id]=this.data.menus[menu_id].item_fast_length &&this.data.menus[menu_id].showSubMenu;
            this.refresh=this.refresh=="2"?"1":"2";
          }
      },
      hideSubMenu(menu_id) {
          this.data.menus[menu_id].showSubMenu = false;
          this.data.show_flag[menu_id]=false;
          this.refresh=this.refresh=="2"?"1":"2";
      },
      handleClick(menu_id,item_id) {
          try{this.data.menus[menu_id].item_dct[item_id].item_callback()}
          catch (err){console.log("err"+err)
}
      },

  },
  mounted:function(){
    //调用此函数刷新整个组件
    _this.refresh_func=function(){
        //创建菜单目录 快速查找数组
        _this.data.fast_menu=(Object.keys(_this.data.menus).map(Number)).sort();
        //创建菜单目录的选项快速查找数组
        let menu_id=null;
        for (let i=0;i<_this.data.fast_menu.length;i++){
            menu_id=_this.data.fast_menu[i];
            _this.data.show_flag[menu_id]=false;
            _this.data.menus[menu_id].item_fast=(Object.keys(_this.data.menus[menu_id].item_dct).map(Number)).sort();
            _this.data.menus[menu_id].item_fast_length=_this.data.menus[menu_id].item_fast.length;
        }
        //更改key 从而刷新整个组件
        _this.refresh=_this.refresh=="2"?"1":"2";
        // console.log("刷新:",_this.refresh);
    }

    
      //查看当前目录数据
      //设置选项
      _this.data.set_item=function(obj){
        /*
        menu_id:目录id
        item_id:选项id
        item_name:选项名称
        item_callback:选项回调
        item_keys:选项快捷方式  //后面需要
        */
        let menu_id=obj.menu_id;
        let item_id=obj.item_id;
        let item_name=obj.item_name;
        let item_callback=obj.item_callback;
        let item_keys=obj.item_keys;
       //如果已经那么仅修改名称
       if (!_this.data.menus.hasOwnProperty(menu_id)){
        //如果没有拥有这个目录 则新建一个
        _this.data.menus[menu_id]={
            "menu_name":'未命名目录',
            "menu_fast":'',
            "showSubMenu":false,
            "item_dct":{},//当前目录的选项
        }
       }
       //如果当前选项已经拥有  那么修改选项相关属性
       if(_this.data.menus[menu_id].item_dct.hasOwnProperty(item_id)){
        _this.data.menus[menu_id].item_dct[item_id].item_name=item_name;
        _this.data.menus[menu_id].item_dct[item_id].item_callback=item_callback;
        _this.data.menus[menu_id].item_dct[item_id].item_keys=item_keys;
       }else
       //如果当前选项没有拥有 那么新建这个选项
        {
            _this.data.menus[menu_id].item_dct[item_id]={
                'item_name':item_name,
                "item_callback":item_callback,
                "item_keys":item_keys
            }
        }
        _this.refresh_func();//刷新组件
      },
      //设置目录
      _this.data.set_menu=function(obj){
        /*
        menu_id:目录id
        menu_name:目录名称
        menu_keys:目录快捷方式
        */
       let menu_id=obj.menu_id;
       let menu_name=obj.menu_name;
       let menu_keys=obj.menu_keys;
       //如果已经拥有这个目录 那么仅修改名称
       if (_this.data.menus.hasOwnProperty(menu_id)){
        _this.data.menus[menu_id]['menu_name']=menu_name;
        _this.data.menus[menu_id]['menu_keys']=menu_keys;
       }else{
        //如果没有拥有则新建一个
        _this.data.menus[menu_id]={
            "menu_name":menu_name,
            "menu_keys":menu_keys,
            "showSubMenu":false,
            "item_dct":{},//当前目录的选项
        }
       }
       _this.refresh_func();//刷新组件
      },
      //绑定快捷方式对象
      _this.data.bind_fast_obj=function(fast_obj){
        /*快捷方式通过全局 快捷方式对象进行调用*/
      }
  }
} 
);



Vue.component2('a_1_0_1_1_0', {  
    template: `
        <div class="a_1_0_1_1_0_menu_bar" :key="refresh"  :style="'width:'+data.width">

            <div class="a_1_0_1_1_0_activity_item" v-for="(menu_id, index) in data.fast_menu" :key="index" @click="selectActivity(menu_id)" :class="{ a_1_0_1_1_0_active: menu_id == selectedActivity }"@mouseover="showSubMenu(menu_id)" @mouseleave="hideSubMenu(menu_id)">
                <span :class="data.menus[menu_id].menu_class"></span>
                <div class="a_1_0_1_1_0_sub_menu" v-if="menu_id==show_menu">
                    <div class="a_1_0_1_1_0_menu_item">
                        {{data.menus[menu_id].menu_name}}
                    </div>
                </div>
            </div>
        </div>
`,  
  data() {
      return {
        
        show_menu:"-1",
        selectedActivity:'0',
        refresh:"1",/*用来刷新组件*/
        data:{
            width:"100%",
            menus: {

        },
        fast_menu:[],//存放menus ids的数组 ids被转为整数 按照sort顺序排列
        show_flag:{}
        }
         
      };
  },
  methods: {
    showSubMenu(menu_id) {
        if (this.show_menu!=menu_id){
            this.show_menu=menu_id;
            // console.log(this.show_menu)
            this.refresh=this.refresh=="2"?"1":"2";
        }
    },
    hideSubMenu(menu_id) {
        this.show_menu=null;
        this.refresh=this.refresh=="2"?"1":"2";
    },
    selectActivity(id) {
        this.selectedActivity = id;
        for (let key in this.data.menus){

            // try{
                // console.log("run",`${this.data.menus[key].var_name}.set_show_index(${key})`)
                if(!(this.data.menus[key].init)){
                    this.data.menus[key].init=true;
                    lhp_run_func(`${this.data.menus[key].var_name}.set_show_index`,key)
                }
                // console.log("run",`${this.data.menus[key].var_name}.show_index_callback(${id})`)
                lhp_run_func(`${this.data.menus[key].var_name}.show_index_callback`,id)
                // }
            // catch{}
        }
        // console.log(`Selected activity: ${id}`);
    },

  },
  mounted:function(){
    //调用此函数刷新整个组件
    _this.refresh_func=function(){
        //创建菜单目录 快速查找数组
        _this.data.fast_menu=(Object.keys(_this.data.menus).map(Number)).sort();
        _this.refresh=_this.refresh=="2"?"1":"2";
    }

    
      //设置选项
      _this.data.set_menu=function(obj){
        /*
        var_name:全局变量 【window[var_name]】
        menu_id:选项id
        menu_name:选项名称
        menu_class:选项类
        menu_keys:选项快捷方式
        */
       let menu_id=obj.menu_id;
       let var_name=obj.var_name;
       let menu_name=obj.menu_name;
       let menu_class=obj.menu_class;
       let menu_keys=obj.menu_keys;
       let callback=obj.callback;
       //如果已经拥有这个目录 那么仅修改名称
       if (_this.data.menus.hasOwnProperty(menu_id)){
        _this.data.menus[menu_id]['menu_name']=menu_name;
        _this.data.menus[menu_id]['menu_class']=menu_class;
        _this.data.menus[menu_id]['menu_keys']=menu_keys;
        _this.data.menus[menu_id]['callback']=callback;
       }else{
        //如果没有拥有则新建一个
        _this.data.menus[menu_id]={
            "menu_name":menu_name,
            "menu_keys":menu_keys,
            "var_name":var_name,
            "menu_class":menu_class,
            "callback":callback,
        }
       }
       _this.refresh_func();//刷新组件
      },
      _this.data.选择=_this.selectActivity;
      //绑定快捷方式对象
      _this.data.bind_fast_obj=function(fast_obj){
        /*快捷方式通过全局 快捷方式对象进行调用*/
      }
  }
} 
);



Vue.component2('a_1_0_1_2_0', {  
    template: `
        <div class="a_1_0_1_2_0_menu_bar" :key="refresh" :style="'width:'+data.width">
{{show_project_name}} EA999
        </div>
`,  
  data() {
      return {
        show_project_name:"",
        refresh:"1",/*用来刷新组件*/
        data:{
            width:"60%",
        }
         
      };
  },
  mounted:function(){
    //调用此函数刷新整个组件
    _this.refresh_func=function(){
        //更改key 从而刷新整个组件
        _this.refresh=_this.refresh=="2"?"1":"2";
    }

    
      //查看当前目录数据
      //设置选项
      _this.data.set_project=function(obj){
        /*
        user_id:项目所有者id
        dir1_id:目录1id
        temp_id:项目id
        project_name:项目名称
        */
        let user_id=obj.user_id;
        let dir1_id=obj.dir1_id;
        let temp_id=obj.temp_id;
        let project_name=obj.project_name;
        _this.show_project_name=`${project_name}(${user_id}/${dir1_id}/${temp_id})`;
        _this.refresh_func();//刷新组件
       }
       
  }
} 
);



Vue.component2('a_1_0_1_3_0', {  
    template: `
        <div class="a_1_0_1_3_0_menu_bar" :key="refresh" :style="'width:'+data.width">
<div class="a_1_0_1_1_0_activity_item"><span class="icon iconfont icon-yonghu"></span> <!----></div>
        </div>
`,  
  data() {
      return {
        now_select:"-1",
        refresh:"1",/*用来刷新组件*/
        data:{
            width:"20%",
            menus: {

        },
        fast_menu:[],//存放menus ids的数组 ids被转为整数 按照sort顺序排列
        show_flag:{}
        }
         
      };
  },
  methods: {

  },
  mounted:function(){
    //调用此函数刷新整个组件
    _this.refresh_func=function(){
        //创建菜单目录 快速查找数组
        _this.data.fast_menu=(Object.keys(_this.data.menus).map(Number)).sort();
        //创建菜单目录的选项快速查找数组
        let menu_id=null;
        for (let i=0;i<_this.data.fast_menu.length;i++){
            menu_id=_this.data.fast_menu[i];
            _this.data.show_flag[menu_id]=false;
            _this.data.menus[menu_id].item_fast=(Object.keys(_this.data.menus[menu_id].item_dct).map(Number)).sort();
            _this.data.menus[menu_id].item_fast_length=_this.data.menus[menu_id].item_fast.length;
        }
        //更改key 从而刷新整个组件
        _this.refresh=_this.refresh=="2"?"1":"2";
        // console.log("刷新:",_this.refresh);
    }

  }
} 
);



Vue.component2('a_1_0_1_4_0', {  
    template: `
        <div class="a_1_0_1_4_0_menu_bar" :key="refresh" :style="'width:'+data.width">

        </div>
`,  
  data() {
      return {
        now_select:"-1",
        refresh:"1",/*用来刷新组件*/
        data:{
            width:"80%",
            menus: {

        },
        fast_menu:[],//存放menus ids的数组 ids被转为整数 按照sort顺序排列
        show_flag:{}
        }
         
      };
  },
  methods: {
      showSubMenu(menu_id) {
          this.data.menus[menu_id].showSubMenu = true;
          if (!this.data.show_flag[menu_id]){
            this.now_select=menu_id;
            this.data.show_flag[menu_id]=this.data.menus[menu_id].item_fast_length &&this.data.menus[menu_id].showSubMenu;
            this.refresh=this.refresh=="2"?"1":"2";
          }
      },
      hideSubMenu(menu_id) {
          this.data.menus[menu_id].showSubMenu = false;
          this.data.show_flag[menu_id]=false;
          this.refresh=this.refresh=="2"?"1":"2";
      },
      handleClick(menu_id,item_id) {
          alert(`当前点击${menu_id} ${item_id}`);
      },

  },
  mounted:function(){
    //调用此函数刷新整个组件
    _this.refresh_func=function(){
        //创建菜单目录 快速查找数组
        _this.data.fast_menu=(Object.keys(_this.data.menus).map(Number)).sort();
        //创建菜单目录的选项快速查找数组
        let menu_id=null;
        for (let i=0;i<_this.data.fast_menu.length;i++){
            menu_id=_this.data.fast_menu[i];
            _this.data.show_flag[menu_id]=false;
            _this.data.menus[menu_id].item_fast=(Object.keys(_this.data.menus[menu_id].item_dct).map(Number)).sort();
            _this.data.menus[menu_id].item_fast_length=_this.data.menus[menu_id].item_fast.length;
        }
        //更改key 从而刷新整个组件
        _this.refresh=_this.refresh=="2"?"1":"2";
        // console.log("刷新:",_this.refresh);
    }

    
      //查看当前目录数据
      //设置选项
      _this.data.set_item=function(obj){
        /*
        menu_id:目录id
        item_id:选项id
        item_name:选项名称
        item_callback:选项回调
        item_keys:选项快捷方式  //后面需要
        */
        let menu_id=obj.menu_id;
        let item_id=obj.item_id;
        let item_name=obj.item_name;
        let item_callback=obj.item_callback;
        let item_keys=obj.item_keys;
       //如果已经那么仅修改名称
       if (!_this.data.menus.hasOwnProperty(menu_id)){
        //如果没有拥有这个目录 则新建一个
        _this.data.menus[menu_id]={
            "menu_name":'未命名目录',
            "menu_fast":'',
            "showSubMenu":false,
            "item_dct":{},//当前目录的选项
        }
       }
       //如果当前选项已经拥有  那么修改选项相关属性
       if(_this.data.menus[menu_id].item_dct.hasOwnProperty(item_id)){
        _this.data.menus[menu_id].item_dct[item_id].item_name=item_name;
        _this.data.menus[menu_id].item_dct[item_id].item_callback=item_callback;
        _this.data.menus[menu_id].item_dct[item_id].item_keys=item_keys;
       }else
       //如果当前选项没有拥有 那么新建这个选项
        {
            _this.data.menus[menu_id].item_dct[item_id]={
                'item_name':item_name,
                "item_callback":item_callback,
                "item_keys":item_keys
            }
        }
        _this.refresh_func();//刷新组件
      },
      //设置目录
      _this.data.set_menu=function(obj){
        /*
        menu_id:目录id
        menu_name:目录名称
        menu_keys:目录快捷方式
        */
       let menu_id=obj.menu_id;
       let menu_name=obj.menu_name;
       let menu_keys=obj.menu_keys;
       //如果已经拥有这个目录 那么仅修改名称
       if (_this.data.menus.hasOwnProperty(menu_id)){
        _this.data.menus[menu_id]['menu_name']=menu_name;
        _this.data.menus[menu_id]['menu_keys']=menu_keys;
       }else{
        //如果没有拥有则新建一个
        _this.data.menus[menu_id]={
            "menu_name":menu_name,
            "menu_keys":menu_keys,
            "showSubMenu":false,
            "item_dct":{},//当前目录的选项
        }
       }
       _this.refresh_func();//刷新组件
      },
      //绑定快捷方式对象
      _this.data.bind_fast_obj=function(fast_obj){
        /*快捷方式通过全局 快捷方式对象进行调用*/
      }
  }
} 
);



Vue.component2('a_1_0_2_0_0_lines', {  
    template: `
        <div :class="{ 'a_1_0_2_0_0_lines test': data.true, 'a_1_0_2_0_0_lines_onclick': data.onclick_flag }" class="" @click="handle_click" v-show="show_flag">
        <span class="a_1_0_2_0_0_hid_line":style="'padding-left: '+data._space_+'px;'"></span>
        <span  v-if="data.icon1_show_flag":class="{'icon iconfont':data.true,'icon-right':data.close,'icon-down':data.close==false}"></span>
        
        <span style="color:#bcbcbc">{{data.name}}</span>
        </div>
`,
data(){
    return{
        show_flag:true,
        data:{
            onclick_flag:false,
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            false:false,
            close:true,
            name:"",
            _space_:0,
        }
    }
},
methods:{
    handle_click:function(event){
        //点击当前 高亮显示
        try{//console.log("高亮",this.data.path);
this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
        if (this.data.click){
            try{
                this.data.click(event)
                
                // console.log("start click2")
            }
            catch{}
            return 
        }
        if (this.data.click_obj){
            try{
                lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
            
                // console.log("start click3")
            }
            catch{}
            return 
        }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    }
}})
//计时器
window.a_1_0_2_0_0_timer=null;
//待处理数据列表
window.a_1_0_2_0_0_timer_lst=[];
//计时器运行函数
window.a_1_0_2_0_0_timer_func= async function(){
    while(window.a_1_0_2_0_0_timer_lst.length){
        let new_obj=window.a_1_0_2_0_0_timer_lst.shift();
        let func=new_obj.func;
        if(func.constructor.name === 'AsyncFunction'){
            await func(new_obj.params);
        } else{
            func(new_obj.params);
        }
    }
    window.a_1_0_2_0_0_timer=null;
};
//给计数器运行的函数添加待处理数据  如果计时器没有开启则开启计时器
window.a_1_0_2_0_0_timer_start=function(obj) {  
    window.a_1_0_2_0_0_timer_lst.push(obj);
    if(window.a_1_0_2_0_0_timer==null){

        window.a_1_0_2_0_0_timer = setTimeout(a_1_0_2_0_0_timer_func, 0);    // 设置计时器为开启状态  
    }
}  
Vue.component2('a_1_0_2_0_0', {  
    template: `
        <div class="a_1_0_2_0_0_base" ref="father"v-show="data.show_flag">
        </div>
`,  
  data() {
      return {
        show_index:'-1',
        callback:"",
        init_flag:0,
        now_select:"-1",
        refresh:"1",/*用来刷新组件*/
        data:{
            tree_data:{check_dct:{}},//数据会传递给所有子节点的vue对象.data.tree_data中
            show_flag:true,
            data:{},
            data_init:false,
            close:true,
            fast_data:{}, //快速访问dom
            fast_vue_data:{},//快速访问vue
            open_dict:{},//节点展开的状态保存
            open_dict_init:false,//open_dict初始化
            // {
            //     0:{
            //         close:true,
                        // open_num:
            //         dict:{

            //         }
            //     }
            
            // }
            
        },
      };
  },
  methods:{
    //添加进时间处理器中 同步进行处理
    add_timer:function(){},
    insertAfter:function(newNode, referenceNode, parentNode) {  
        if(referenceNode==parentNode){
            parentNode.appendChild(newNode);  
            return
        }
        // 将 newNode 插入到 referenceNode 之后  
        if (referenceNode.nextSibling) {  
            // /* console.log("?")*/
            parentNode.insertBefore(newNode, referenceNode.nextSibling);  
        } else {  
            //如果是最后一个子节点 则追加
            let father_child_lst=parentNode.children;
            if (father_child_lst[father_child_lst.length-1]===referenceNode){
                parentNode.appendChild(newNode);
                return
            }
            //否则插入
            // 获取父元素的第一个子节点  
            let firstChild = parentNode.firstChild;  
              
            // 在第一个子节点之前插入新节点  
            if (firstChild) {  
                parentNode.insertBefore(newNode, firstChild);  
                // parentNode.appendChild(newNode);  
            } else {  
                // 如果没有子节点，直接添加新节点  
                parentNode.appendChild(newNode);  
            }
        }  
    },
    handle_click:function(event,flag=null){

      // event.target 是触发点击事件的元素  
      let clickedElement = event.target;  
      if(!flag){event.stopPropagation();}//阻止父级
    }
  },
  mounted:function(){
    window['dddd']=_this
    _this.wait_run_func_class_obj=new wait_run_func_class();
    console.log("_this.deepcopy_data.tree_data.",_this.deepcopy_data,_this.deepcopy_data.tree_data);
    if(!_this.deepcopy_data.tree_data){
        _this.deepcopy_data.tree_data={check_dct:{}};
    }
    _this.deepcopy_data.tree_data.get_father=function(){
        return _this.data
    }
    _this.deepcopy_data.tree_data.change_deepcopy_data=function(path,copy_data){
        if(!copy_data){console.log("修改参数失败，传参异常",path,copy_data)
}
        let path_lst=path.split(".");
        let data=_this.data.data;
        for(let i=0;i<path_lst.length;i++){
            data=data.dict[path_lst[i]];
        }
        lhp_deepcopy1(data.base_info.deepcopy_data,copy_data);
        try{lhp_deepcopy1(_this.data.fast_vue_data[path].$refs.ref_obj.data,copy_data)}catch{}
    }
    _this.del_data=function(path){
        let path_lst=path.split(".");
        let last_k=path_lst[path_lst.length-1];
        let del_data=_this.data.data;
        // console.log("del_data1",del_data)
        for(let i=0;i<path_lst.length-1;i++){
            del_data=del_data.dict[path_lst[i]];
            // console.log("del_data1",del_data)
        }

        console.log("del_data2",del_data,last_k)
        delete del_data.dict[last_k];
    }
    _this.deepcopy_data.tree_data.del_path=function(path){
        let ddd=path;
//如果处于展开状态 那么关闭展开
        let now_open_dict=_this.data.get_now_open_dict(ddd);
        
        if(now_open_dict.close==false){
            _this.data._close(ddd);
        }   
//如果存在快速访问方式 那么删除快速访问
if (_this.data.fast_data[ddd]){
    try{
        console.log("del ddd",ddd)
        let open_del=_this.data.open_dict;
        let d_path_lst=ddd.split(".");
        for (let i9=0;i9<d_path_lst.length-1;i9++){open_del=open_del[d_path_lst[i9]]}
        delete open_del[d_path_lst[d_path_lst.length-1]];
        _this.$refs.father.removeChild(_this.data.fast_data[ddd]);
        delete _this.data.fast_data[ddd];
        delete _this.data.fast_vue_data[ddd];
    }catch{}

}
//删除数据
_this.del_data(ddd);



    }
    //调用此函数 会对目标vueobj.data.onclick_flag=true; 取消其他高亮
    _this.deepcopy_data.tree_data.set_onclick_flag=function(path){
        //初始化
        // console.log("初始化");
        if(!_this.__onclick_now){_this.__onclick_now='??'}
        //设置上一个高亮为false
        // console.log("取消上一个高亮_this.data.fast_vue_data[_this.__onclick_now].$refs.ref_obj");
        try{_this.data.fast_vue_data[_this.__onclick_now].$refs.ref_obj.data.onclick_flag=false;}catch{}
        //设置当前高亮为true
        // console.log("设置当前为高亮",_this.data.fast_vue_data[path].$refs.ref_obj);window.nnn2=_this.data.fast_vue_data[path].$refs.ref_obj
        _this.__onclick_now=path;
        _this.data.fast_vue_data[path].$refs.ref_obj.data.onclick_flag=true;
    }
    _this.set_open_dict=function(dict,path){
        let  open_dict= _this.data.open_dict;
        let  copy_dict=_this.data.copy({dict:dict});
        // delete copy_dict.close;
        let path_lst=path.split(".");
        for(let i=0;i<path_lst.length;i++){
            open_dict=open_dict[path_lst[i]];
        }
        let v={};
        for (let k in copy_dict){
            if(open_dict.hasOwnProperty(k)){continue}
            else{
                v[k]=copy_dict[k];
            }
        }
        if(!open_dict.hasOwnProperty('close')){open_dict.close=copy_dict.close}
        open_dict.num=copy_dict.num;
        lhp_deepcopy1(open_dict,v)
    }
    _this.data.get_close=function(path){
        let path_lst=path.split(".");
        let check_open_dct=_this.data.open_dict;
        for(let i=0;i<path_lst.length;i++){
            check_open_dct=check_open_dct[path_lst[i]];
        }
        return check_open_dct.close;
    }
    //获取父节点下上一个子节点的key 没有则返回-In...
    _this.data.get_before=function(father_path,key){
        console.log("father,k",father_path,key)
        let path_lst=father_path.split(".");
        let check_open_dct=_this.data.open_dict;
        for(let i=0;i<path_lst.length;i++){
            check_open_dct=check_open_dct[path_lst[i]];
        }
        let key_v=Number(key);
        let maxIntKey = -Infinity;  
        for (let k in check_open_dct) {  
            if (check_open_dct.hasOwnProperty(k)) {  
                let intKey = Number(k);  
                if (!isNaN(intKey) && intKey < key_v && intKey > maxIntKey) {  
                    maxIntKey = intKey;  
                }  
            }  
        }  
        if (maxIntKey==-Infinity){return -Infinity}
        else{
            return father_path+'.'+maxIntKey;
        }


    }
    //获取到目标节点的最后一个dom
    _this.data.get_last=function(path){
        let path_lst=path.split(".");
        let check_open_dct=_this.data.open_dict;
        for(let i=0;i<path_lst.length;i++){
            check_open_dct=check_open_dct[path_lst[i]];
        }
        let last_path=path;
        while (1){
            if (check_open_dct.close==true){return _this.data.fast_data[last_path]}
            else{
                // 提取并转换所有可以转换为整数的键  
                let intKeys = Object.keys(check_open_dct).filter(key => /^\d+$/.test(key)).map(Number);  
                if(!intKeys.length){return _this.data.fast_data[last_path]}
                let maxIntKey = Math.max(...intKeys);  
                check_open_dct=check_open_dct[maxIntKey];
                last_path=last_path+'.'+maxIntKey;
            }
        }
    }
    _this.data._set_dict=function(obj){
        
        let dict=obj.dict;
       let path=obj.path;
        // console.log("_this.data.get_close(path)",_this.data.get_close(path))
        //加载这部分的this.data.open_dict
        console.log("dict path",dict,path)
        _this.set_open_dict(dict,path);
        //加载这部分内容到this.data.data中
        let path_lst=path.split(".");
        // let last_k=path_lst[path_lst.length-1];
        // let father_path=path.substring(0, path.lastIndexOf('.'));  
        console.log("dict path",dict,path)
        let father_close=_this.data.get_close(path);
        // console.log("_this.data.get_close(path)1",_this.data.get_close(path))
        let set_data=_this.data.data;
        // console.log("_this.data.get_close(path)2",_this.data.get_close(path))
        for(let i=0;i<path_lst.length;i++){
            set_data=set_data['dict'][path_lst[i]];
        }
        // console.log("_this.data.get_close(path)3",_this.data.get_close(path))
        for (let key in dict){
            if(!set_data['dict'][key]){
                // console.log("检测到新增的数据",path+'.'+key)
                set_data['dict'][key]=dict[key]
                // console.log("检测父组件显示状态（显示则为True",!father_close)
                //如果这部分正在显示 那么创建这个dom
                if(!father_close){
                    console.log("dict[key].base_info",dict[key].base_info)
                                let vue_name=dict[key].base_info.vue_name||'a_1_0_2_0_0_lines';//要渲染的vue模板名称
                                //新建一个dom
                                let new_dom=document.createElement(vue_name);
                                //设置dom属性 ref值为ref_obj
                                new_dom.setAttribute('ref', 'ref_obj');
                                let t_deepcopy_data=JSON.parse(JSON.stringify(dict[key].base_info.deepcopy_data));
                                t_deepcopy_data['_space_']=path_lst.length*8;//退格
                                t_deepcopy_data['path']=path+'.'+key;
                                t_deepcopy_data['tree_data']=_this.data.tree_data;
                                t_deepcopy_data['click_handle']=_this.data.click_handle;
                                new_dom.setAttribute(':deepcopy_data',"deepcopy_data");//初始化vue模板的参数
                                new_dom.setAttribute('dom_path',path+'.'+key);//初始化vue模板的参数
                                let vue_dct={'el':new_dom,data:{true:true,false:false,null:null,deepcopy_data:t_deepcopy_data}}
                                let before_path=_this.data.get_before(path,key);
                                console.log("???beforepath",before_path,path,key)
                                if(before_path==-Infinity){
                                    _this.insertAfter(new_dom,_this.data.fast_data[path],_this.$refs.father);
                                }else{
                                    _this.insertAfter(new_dom,_this.data.get_last(before_path),_this.$refs.father);
                                }
                                let new_vue=new Vue(vue_dct);
                                // window.test_vue=new_vue;
                                _this.data.fast_data[path+'.'+key]=new_vue.$el;
                                // next_dom2=new_vue.$el;
                                _this.data.fast_vue_data[path+'.'+key]=new_vue;
                }
            }else{
                // console.log("没有新增数据",path+'.'+key)
                // console.log("检测父组件显示状态（显示则为True",!father_close)
                lhp_deepcopy1(set_data['dict'][key]['base_info'],dict[key]['base_info']);
                //如果这部分正在显示 那么更新这个dom
                if(!father_close){
                    //新建一个dom
                    // new_dom=document.createElement(vue_name);
                    // //设置dom属性 ref值为ref_obj
                    // new_dom.setAttribute('ref', 'ref_obj');
                    // t_deepcopy_data['_space_']=path_lst.length*8;//退格
                    // t_deepcopy_data['path']=path;
                    // t_deepcopy_data['tree_data']=_this.data.tree_data;
                    // t_deepcopy_data['click_handle']=_this.data.click_handle;
                    // new_dom.setAttribute(':deepcopy_data',"deepcopy_data");//初始化vue模板的参数
                    // new_dom.setAttribute('dom_path',path+'.'+key);//初始化vue模板的参数
                    // let vue_dct={'el':new_dom,data:{true:true,false:false,null:null,deepcopy_data:t_deepcopy_data}}
                    // if(key==1){
                    //     _this.insertAfter(new_dom,_this.data.fast_data[path],_this.$refs.father);
                    // }else{
                    //     _this.insertAfter(new_dom,_this.data.fast_data[path+'.'+(Number(key)-1)],_this.$refs.father);
                    // }
                    // new_vue=new Vue(vue_dct);
                    // // window.test_vue=new_vue;
                    // _this.data.fast_data[path+'.'+key]=new_vue.$el;
                    // // next_dom2=new_vue.$el;
                    // _this.data.fast_vue_data[path+'.'+key]=new_vue;
                    
                }
            }
        }

        // console.log("_this.data.get_close(path)4",_this.data.get_close(path))
    }
    _this.data.set_dict=function(dict,path){
        
    console.log("?12")
        _this.wait_run_func_class_obj.timer_start({
            func:_this.data._set_dict,
            params:{
                dict:dict,
                path:path
            }
        })
       
    console.log("?22")
    }
    _this.deepcopy_data.tree_data.set_dict=_this.data.set_dict;
    _this.data.show_index_callback=function(index){
        if(index==_this.show_index){
            _this.data.show_flag=true;
            if(_this.data.data_init==false){
                _this.data.data_init=true;
                // console.log("init!!!")
                _this.data.open("");
            }
        }else{_this.data.show_flag=false}
    }
    _this.data.set_show_index=function(show_index){
        _this.show_index=show_index;
    }
  //初始化
  _this.init=function(){
    _this.data.open('');
    _this.init_flag=1;
  }
  _this.data.click_handle=async function(path,close_flag){
    if(close_flag==true){
       await _this.data.open(path);
    }else{
        await _this.data.close(path);
    }
  }
  //展开
  _this.data.set_open=function(__this){
    // console.log("设置为展开",__this)
    __this.$refs.ref_obj.data.close=false;
  }
  //闭合
  _this.data.set_close=function(__this){
    __this.$refs.ref_obj.data.close=true;
  }
  _this.data.copy=function(copy_data){
    let res={};
    let lst=[[copy_data,res]];
    while (lst.length){
        let item=lst.pop();
        let new_data=item[0];
        let new_res=item[1];
        new_res.close=true;
        if (new_data.dict){
            // console.log("...")
            new_res.num=Object.keys(new_data.dict).length+1;
            for (let key in new_data.dict){
                new_res[key]={};
                new_res2=new_res[key];
                lst.push([
                    new_data.dict[key],
                    new_res2

                ])
            }
        }else{
            new_res.num=1;
        }
    }
    // console.log("end")
    return res
  }
  _this.sleep=function sleep(ms) {  
    return new Promise(resolve => setTimeout(resolve, ms));  
}  
_this.data.check_variable=function(variable, keyOrIndex) {  
    // 判断是数组还是对象  
    if (Array.isArray(variable)) {  
        // 如果是数组，判断索引是否存在  
        if (variable.hasOwnProperty(keyOrIndex.toString()) && Number.isInteger(Number(keyOrIndex))) {  
            // console.log(`索引 ${keyOrIndex} 存在于数组中`);  
            return 1
        } else {  
            // console.log(`索引 ${keyOrIndex} 不存在于数组中`);  
            return 2
        }  
    } else if (variable && typeof variable === 'object' && !Array.isArray(variable)) {  
        // 如果是对象，判断键是否存在  
        if (variable[keyOrIndex]) {  
            // console.log(`键 "${keyOrIndex}" 存在于对象中`);  
            return 3
        } else {  
            // console.log(`键 "${keyOrIndex}" 不存在于对象中`);  
            return 4
        }  
    } else {  
        // console.log('变量既不是数组也不是对象');  
    }  
}  
_this.data.isPlainObject=function(variable) {  
    return variable !== null &&  
           typeof variable === 'object' &&  
           !Array.isArray(variable) &&  
           Object.getPrototypeOf(variable) === Object.prototype;  
} 
function removeLastDotAndAfter(str) {  
    // 找到最后一个点的索引位置  
    let lastIndex = str.lastIndexOf('.');  
      
    // 如果找到了点，则截取点到字符串开头之间的部分  
    if (lastIndex !== -1) {  
        return str.substring(0, lastIndex);  
    }  
      
    // 如果没有找到点，则返回原始字符串  
    return str;  
}  
function splitByLastDot(str) {  
    // 查找最后一个点的索引位置  
    const lastIndex = str.lastIndexOf('.');  
  
    // 根据索引位置分割字符串  
    if (lastIndex !== -1) {  
        // 如果有点，返回分割后的两部分  
        return [str.slice(0, lastIndex), str.slice(lastIndex+1)];  
    } else {  
        // 如果没有点，返回原始字符串和一个空字符串  
        return [str, ''];  
    }  
} 
_this.data.get_now_open_dict=function(path){
    
    let now_open_dict=_this.data.open_dict;
    path=removeLastDotAndAfter(path);

    let new_p=path.replace(/dict./g,"").replace(/data./g,"");
    if (new_p.endsWith('.dict')) {  
        new_p=new_p.slice(0, -5);  
    }  
    let new_p_lst=new_p.split(".");
    // console.log("open_dict",JSON.parse(JSON.stringify(_this.data.open_dict)))
    // console.log("new_p_lst",new_p_lst)
    for(let new_p_i=0;new_p_i<new_p_lst.length;new_p_i++){
        now_open_dict=now_open_dict[new_p_lst[new_p_i]];
    }
    return now_open_dict;
}
_this.data.get_now_open_dict2=function(new_p_lst){
    
    let now_open_dict=_this.data.open_dict;
    for(let new_p_i=0;new_p_i<new_p_lst.length-1;new_p_i++){
        now_open_dict=now_open_dict[new_p_lst[new_p_i]];
    }
    return now_open_dict;
}
_this.lhp_set1=function(obj_){
    let data_type=obj_.data_type;//要修改的数据类型  post||put delete clear
    // let _this=obj_._this;//this vue对象
    let path=obj_.path;//path为data_obj要修改的数据的路径
    let data=obj_.data;//data为修改的数据
    console.log("lhp_set1",obj_)
    //类型为新增或者修改
    if (data_type=='postput'){
    let change_obj=_this.data;
    let last_path=null;
    if (path.indexOf(".") !== -1){
        let path_lst=path.split(".");
        for (let i=0;i<path_lst.length-1;i++){change_obj=change_obj[path_lst[i]]}
        last_path=path_lst[path_lst.length-1];
    }else{last_path=path}
    // console.log("change_obj",change_obj)
    // console.log("last_path",last_path)
    if(_this.data.isPlainObject(change_obj)){
        if(change_obj.hasOwnProperty(last_path)){
            lhp_deepcopy1(change_obj[last_path],JSON.parse(JSON.stringify(data)));

        }else{
            change_obj[last_path]=JSON.parse(JSON.stringify(data));
        }
    }else if(isArray(change_obj)){
        if(change_obj[last_path]!=undefined){
            lhp_deepcopy1(change_obj[last_path],JSON.parse(JSON.stringify(data)));
        }else{
            change_obj[last_path]=JSON.parse(JSON.stringify(data));
        }
    }
    // console.log("path",path)
    // console.log("_this.$set(change_obj,last_path,data)",change_obj,last_path,data)
    // lhp_deepcopy1(change_obj,JSON.parse(JSON.stringify(data)));
    //类型为删除
    }else if(data_type=="delete"){
        let change_obj=_this.data.data;
        let father_idx=null;
        let father_obj=null;
        if (path.indexOf(".") !== -1){
            let path_lst=path.split(".");
            if (path_lst.length<=1){console.log("delete异常 数量小于等于1");
return}
            for (let i=0;i<path_lst.length-1;i++){father_obj=change_obj;father_idx=path_lst[i];change_obj=change_obj[path_lst[i]];}
            let last_idx=path_lst[path_lst.length-1];
            // let new_data=JSON.parse(JSON.stringify(change_obj));
            if(typeof change_obj =="object") {  
                if (Array.isArray(change_obj)){
                    change_obj.splice(last_idx,1);

                }else{
                    delete change_obj[last_idx];
                }
        }}else{console.log("delete异常 数量小于2");
return}

        
//类型为清空数据
}else if(data_type=="clear"){
    let change_obj=_this.data;
    let last_key=null;
    if (path.indexOf(".") !== -1){
        let path_lst=path.split(".");
        for (let i=0;i<path_lst.length-1;i++){change_obj=change_obj[path_lst[i]]}
        last_key=path_lst[path_lst.length-1];
    }else{
        last_key=path;
    
    }
    let temp_val=change_obj[last_key]
switch (typeof temp_val) {  
        case 'object':  
            // 注意：这里会匹配到null，因为null也是object类型  
            // 需要额外检查是否为null  
            if (temp_val === null) {  
                change_obj[last_key] = null; // 或者你可以将null也设置为{}  
            } else if (Array.isArray(temp_val)) {  
                change_obj[last_key] = [];  
            } else {  
                change_obj[last_key] = {};  
            }  
            break;  
        case 'string':  
        change_obj[last_key] = '';  
            break;  
        case 'number':  
        change_obj[last_key] = 0;  
            break;  
        case 'boolean':  
        change_obj[last_key] = false;  
            break;  

}


}else if(data_type=='insert'){
    // let before_idx=obj_.before_idx;
    let change_obj=_this.data;
    // let last_path=null;
    // console.log("insert检查-1 obj_",obj_)
    // console.log("insert检查 前data",JSON.parse(JSON.stringify(_this.data.data)))
    if (path.indexOf(".") !== -1){
        let path_lst=path.split(".");
        for (let i=0;i<path_lst.length-1;i++){change_obj=change_obj[path_lst[i]]}
        last_path=path_lst[path_lst.length-1];
    }else{last_path=path}
    change_obj[last_path]=JSON.parse(JSON.stringify(data));
    //类型为删除
    }
}

// 示例数组
// let array = ["123", "abc", "456", "def", "789", "ghi", 0, "0", " "];
 
// 使用 filter 方法过滤非数字的字符串
let filteredArray = function(array){
    let res=[];
    for(let i=0;i<array.length;i++){
        try{
            let val=Number(array[i])+'';
            if (val!='NaN'){
                res.push(Number(array[i])+'');
            }
        }catch{}
    }
    return res
}
// console.log(filteredArray); // 输出: [123, 456, 789, 0]
//接收协同数据更改后 创建open_dict临时变量 以及打开当前已经显示的数据
_this.data._add_open_dict_and_open=function(obj_){
    let ttt=new Date().getTime();
    // console.log(">>>>????FFFF")
    let data_type=obj_.data_type;//要修改的数据类型  post||put delete clear
    let _this=obj_._this;//this vue对象
    let path=obj_.path;//path为data_obj要修改的数据的路径
    let data=obj_.data;//data为修改的数据
    let path_lst=path.split(".");
    let new_path=filteredArray(path_lst);
    let ddd=new_path.join(".");
    // let last_str=path_lst[path_lst.length-1];
    //类型为新增或者修改
    if (data_type=='postput'){
        _this.lhp_set1(obj_);
        // console.log(">>>>>>????fffff2222",path)
        //检查是否属于添加新的项
        if(path_lst[path_lst.length-2]=='dict'){
            // console.log("pathlsssst",path_lst,new_path)
            let last_idx=new_path[new_path.length-1];
            //生成的open_dict
            let now_open_dict=_this.data.get_now_open_dict2(new_path);
            // console.log("now_open_dicteeeeeeeeee",now_open_dict,last_idx,data,_this.data.copy(data))
            //检查当前树是否拥有此open_dict
            if(!now_open_dict[last_idx]){
                //将生成的open_dict加载到当前树中
                now_open_dict[last_idx]=_this.data.copy(data);
                //检查上层是否是打开状态  如果是打开状态 那么打开当前层
                if(now_open_dict.close!=true){
                    let vue_name=data.base_info.vue_name||'a_1_0_2_0_0_lines';//要渲染的vue模板名称
                    //新建一个dom
                    let new_dom=document.createElement(vue_name);
                    //设置dom属性 ref值为ref_obj
                    new_dom.setAttribute('ref', 'ref_obj');
    // console.log("??key??!2")
                    let t_deepcopy_data=JSON.parse(JSON.stringify(data.base_info.deepcopy_data));
                    t_deepcopy_data['_space_']=(new_path.length-1)*8;//退格
                    t_deepcopy_data['path']=ddd;
                    t_deepcopy_data['tree_data']=_this.data.tree_data;
                    t_deepcopy_data['click_handle']=_this.data.click_handle;
                    new_dom.setAttribute(':deepcopy_data',"deepcopy_data");//初始化vue模板的参数
                    new_dom.setAttribute('dom_path',ddd);//初始化vue模板的参数
                    let vue_dct={'el':new_dom,data:{true:true,false:false,null:null,deepcopy_data:t_deepcopy_data}}
                    let pathxx=splitByLastDot(ddd);
                    let before_path=_this.data.get_before(...pathxx);
    // console.log("??key??!3")
                    // console.log("???beforepath",before_path,path,key)
                    if(before_path==-Infinity){
                        _this.insertAfter(new_dom,_this.data.fast_data[pathxx[0]],_this.$refs.father);
                    }else{
                        _this.insertAfter(new_dom,_this.data.get_last(before_path),_this.$refs.father);
                    }
                    // console.log("??key??!2")
                    let new_vue=new Vue(vue_dct);
                    // window.test_vue=new_vue;
                    _this.data.fast_data[ddd]=new_vue.$el;
                    // next_dom2=new_vue.$el;
                    _this.data.fast_vue_data[ddd]=new_vue;
                }
            }
            return
        }
        //检查是否时更改组件内容
        if(path_lst[path_lst.length-1]=='deepcopy_data'){
                let path_lst2=ddd.split(".");
                let now_set_obj=_this.data.tree_data.全局配置对象.update_obj.data[_this.data['config_name']];
                // let now_set_obj=_this.data.data;
                for(let i=0;i<path_lst2.length;i++){
                    now_set_obj=now_set_obj['dict'][path_lst2[i]];
                }
                try{_this.data.fast_vue_data[ddd].$refs['ref_obj'].init_val()}catch{}
                lhp_deepcopy1(_this.data.fast_vue_data[ddd].$refs['ref_obj'].data,JSON.parse(JSON.stringify(now_set_obj.base_info.deepcopy_data)));
            return
        }


    let change_obj=_this.data;
    let last_path=null;
    if (path.indexOf(".") !== -1){

        for (let i=0;i<path_lst.length-1;i++){change_obj=change_obj[path_lst[i]]}
        last_path=path_lst[(path_lst.length-1)];
    }else{last_path=path}
    // let select=_this.data.check_variable(change_obj,last_path);
    // console.log("检查这条数据 如果数据线内有数据)不存于open_dict那么,_this.data.isPlainObject(change_obj[last_path])",_this.data.isPlainObject(change_obj[last_path]))
    //检查这条数据 如果数据线内有数据)不存于open_dict那么
        if(_this.data.isPlainObject(change_obj[last_path])){
            let dict_flag=false;
           if (change_obj[last_path].hasOwnProperty('dict')){
            dict_flag=true;
            // _this.data._set_dict({
            //     dict:change_obj[last_path].dict,
            //     path:path.replace("data.","").replace("dict.","").replace(".dict","")
            // })
            // console.log("data1")
            let copy_open_dict={};
            if (last_path=='data'){return}
            copy_open_dict[last_path]=_this.data.copy(change_obj[last_path]);
            let now_open_dict=_this.data.get_now_open_dict(path);
            // console.log("now_open_dict",now_open_dict)
            // console.log("copy_open_dict",copy_open_dict)
            lhp_deepcopy1(now_open_dict,copy_open_dict);
            // console.log("startx",now_open_dict.close)
            if(now_open_dict.close==false){
                let ddd=path.replace(/data./g,"").replace(/dict./g,"").replace(/.dict/g,"");
                let path_lst=ddd.split(".");
                let now_set_obj=_this.data.data;
                for(let i=0;i<path_lst.length;i++){
                    now_set_obj=now_set_obj['dict'][path_lst[i]];
                }
                console.log()
                //如果没有被显示
                if  (!_this.data.fast_data.hasOwnProperty(ddd)){
                    console.log("没有显示")
                    // console.log("??key??!1")
                                    let vue_name=now_set_obj.base_info.vue_name||'a_1_0_2_0_0_lines';//要渲染的vue模板名称
                                    //新建一个dom
                                    let new_dom=document.createElement(vue_name);
                                    //设置dom属性 ref值为ref_obj
                                    new_dom.setAttribute('ref', 'ref_obj');
                    // console.log("??key??!2")
                                    let t_deepcopy_data=JSON.parse(JSON.stringify(now_set_obj.base_info.deepcopy_data));
                                    t_deepcopy_data['_space_']=(path_lst.length-1)*8;//退格
                                    t_deepcopy_data['path']=ddd;
                                    t_deepcopy_data['tree_data']=_this.data.tree_data;
                                    t_deepcopy_data['click_handle']=_this.data.click_handle;
                                    new_dom.setAttribute(':deepcopy_data',"deepcopy_data");//初始化vue模板的参数
                                    new_dom.setAttribute('dom_path',ddd);//初始化vue模板的参数
                                    let vue_dct={'el':new_dom,data:{true:true,false:false,null:null,deepcopy_data:t_deepcopy_data}}
                                    let pathxx=splitByLastDot(ddd);
                                    let before_path=_this.data.get_before(...pathxx);
                    // console.log("??key??!3")
                                    // console.log("???beforepath",before_path,path,key)
                                    if(before_path==-Infinity){
                                        _this.insertAfter(new_dom,_this.data.fast_data[pathxx[0]],_this.$refs.father);
                                    }else{
                                        _this.insertAfter(new_dom,_this.data.get_last(before_path),_this.$refs.father);
                                    }
                                    // console.log("??key??!2")
                                    let new_vue=new Vue(vue_dct);
                                    // window.test_vue=new_vue;
                                    _this.data.fast_data[ddd]=new_vue.$el;
                                    // next_dom2=new_vue.$el;
                                    _this.data.fast_vue_data[ddd]=new_vue;
                                    // console.log("??key??!3")


                }

                                   
    }


}

        if(dict_flag==false){
            if(last_path=='deepcopy_data'){
                // console.log("开始处理deepcopy数据")
                let ddd=path.replace(/data./g,"").replace(/dict./g,"").replace(/.dict/g,"").replace(".base_info.deepcopy_data",'');
                console.log("ddd",ddd)
                let path_lst=ddd.split(".");
                let now_set_obj=_this.data.data;
                for(let i=0;i<path_lst.length;i++){
                    now_set_obj=now_set_obj['dict'][path_lst[i]];
                }
                // console.log("_this.data.fast_vue_data[ddd]",_this.data.fast_vue_data[ddd]);
                // console.log("JSON.parse(JSON.stringify(now_set_obj.base_info.deepcopy_data))",JSON.parse(JSON.stringify(now_set_obj.base_info.deepcopy_data)))
                lhp_deepcopy1(_this.data.fast_vue_data[ddd].$refs['ref_obj'].data,JSON.parse(JSON.stringify(now_set_obj.base_info.deepcopy_data)));
        // ttime3(_this.data.fast_vue_data[path],'ref_obj',,func2_lst=[]);//拷贝数据到vue对象内
            }
        }
        }else{
        }

    //检查这条数据 将本该展开的部分展开

    // //检查这条数据 将已展开的且拥有更新deepcopy_data选项全部更新到节点
    


    // lhp_deepcopy1(change_obj[last_path],JSON.parse(JSON.stringify(data)));
    //类型为删除
    }else if(data_type=="delete"){
        try{
            let ddd=path.replace(/data./g,"").replace(/dict./g,"").replace(/.dict/g,"");
            //如果处于展开状态 那么关闭展开
                let change_obj=_this.data;
                let last_path=null;
                if (path.indexOf(".") !== -1){
                    let path_lst=path.split(".");
                    for (let i=0;i<path_lst.length-1;i++){change_obj=change_obj[path_lst[i]]}
                    last_path=path_lst[(path_lst.length-1)];
                }else{last_path=path}
                //检查是否是对象
                if(_this.data.isPlainObject(change_obj[last_path])){
                    let dict_flag=false;
                   if (change_obj[last_path].hasOwnProperty('dict')){
                    dict_flag=true;
                    let now_open_dict=_this.data.get_now_open_dict(path);
                    
                    if(now_open_dict.close==false){
                        _this.data._close(ddd);
            }
            
            
            }
            
            }  
            //如果存在快速访问方式 那么删除快速访问
            if (_this.data.fast_data[ddd]){
                try{
                    console.log("del ddd",ddd)
                    let open_del=_this.data.open_dict;
                    let d_path_lst=ddd.split(".");
                    for (let i9=0;i9<d_path_lst.length-1;i9++){open_del=open_del[d_path_lst[i9]]}
                    delete open_del[d_path_lst[d_path_lst.length-1]];
                    _this.$refs.father.removeChild(_this.data.fast_data[ddd]);
                    delete _this.data.fast_data[ddd];
                    delete _this.data.fast_vue_data[ddd];
                }catch{}
            
            }
            //删除数据
            _this.lhp_set1(obj_);
            
            
        }catch (err){
console.log("err",err)
        }
    
//类型为清空数据
}else if(data_type=="clear"){
    _this.lhp_set1(obj_);
    if(path_lst[path_lst.length-1]=='info'){
        let objxxx=_this.data.fast_vue_data[ddd].$refs['ref_obj'].data.info;

        // console.log("######objxxx######### 111",JSON.parse(JSON.stringify(objxxx)))
        for (let key in objxxx) {
            if (objxxx.hasOwnProperty(key) && key !== 'version') {
            delete objxxx[key];
            }
        }
        // console.log("######objxxx######### 222",JSON.parse(JSON.stringify(objxxx)))
    return
}
    return
    let change_obj=_this.data.data;
    let last_key=null;
    if (path.indexOf(".") !== -1){
        let path_lst=path.split(".");
        for (let i=0;i<path_lst.length-1;i++){change_obj=change_obj[path_lst[i]]}
        last_key=path_lst[path_lst.length-1];
    }else{
        last_key=path;
    
    }
    let temp_val=change_obj[last_key]
switch (typeof temp_val) {  
        case 'object':  
            // 注意：这里会匹配到null，因为null也是object类型  
            // 需要额外检查是否为null  
            if (temp_val === null) {  
                change_obj[last_key] = null; // 或者你可以将null也设置为{}  
            } else if (Array.isArray(temp_val)) {  
                change_obj[last_key] = [];  
            } else {  
                change_obj[last_key] = {};  
            }  
            break;  
        case 'string':  
        change_obj[last_key] = '';  
            break;  
        case 'number':  
        change_obj[last_key] = 0;  
            break;  
        case 'boolean':  
        change_obj[last_key] = false;  
            break;  

}


}else if(data_type=='insert'){
    // let before_idx=obj_.before_idx;
    let change_obj=_this.data.data;
    // let last_path=null;
    // console.log("insert检查-1 obj_",obj_)
    // console.log("insert检查 前data",JSON.parse(JSON.stringify(_this.data.data)))
    if (path.indexOf(".") !== -1){
        let path_lst=path.split(".");
        for (let i=0;i<path_lst.length-1;i++){change_obj=change_obj[path_lst[i]]}
        last_path=path_lst[path_lst.length-1];
    }else{last_path=path}
    change_obj[last_path]=JSON.parse(JSON.stringify(data));
    //类型为删除
    }
    console.log("更新_add_open_dict_and_open耗时:",(new Date().getTime()-ttt)/1000)
}
_this.data.add_open_dict_and_open=function(obj_){
    _this.data._add_open_dict_and_open(obj_);
}
  //点击
  //展开目录

  _this.data._open=async function(path){
    
    //初始化节点的打开信息 以及当前节点的打开数量
    if (_this.data.open_dict_init==false){
        //初始化父节点到快速查找对象中
        _this.data.fast_data[null]=_this.$refs.father;
        _this.data.fast_data['']=_this.$refs.father;
        _this.data.open_dict=_this.data.copy(_this.data.data)//初始化父dom到快速查找字典中
        _this.data.open_dict_init=true;
        // console.log("open_dict",_this.data.open_dict);
    }
    let open_dct=_this.data.open_dict;
    let sort_lst=[];//要排序的列表
    let sort_dct={};
    let father_dom__=_this.$refs.father;
    let father_dom=_this.data.fast_data[path];
    if(path!=''&&path!=null){
        ttime3(_this.data.fast_vue_data[path],'ref_obj',_this.data.set_open,func2_lst=[_this.data.fast_vue_data[path]]);//打开
    }
    // console.log("father_dom__",father_dom__)
    // 创建一个 DocumentFragment  
    // let fragment = document.createDocumentFragment();  
    // console.log("开始展开,展开路径:",path)
    //通过path解析路径
    let obj=_this.data.data;
    let path_lst=path.split(".");
    let space=(path_lst.length-1)*8;
    if (path==''){space=-8}
    // console.log("now space:",path_lst,space)
    if (path==''){path_lst=[]}
    for (let i=0;i<path_lst.length;i++){
        obj=obj.dict[path_lst[i]];
        open_dct=open_dct[path_lst[i]];
    
    }
    //打开当前dom
    open_dct.close=false;
    /*console.log("打开当前dom:",path)*/
    let lst=[{
                "path":path,//父节点的路径
                "insert_id":null,//要插入节点的节点id
                fast_obj:obj,//父节点的 的对象
                'space':space,//缩进位数
                'open_num':0,//当前展开层数
                'open_dct':open_dct
            }];
            // console.log("open 3")
    while (lst.length){
        let temp_lst=null;temp_lst_length=null;now_id=null;new_fast_obj=null;new_father_path=null;
        let new_dom=null;new_vue=null;t_deepcopy_data=null;new_fast_obj_base_info=null;vue_name=null;
        let lst_item=lst.pop();
        let new_path=lst_item['path'];//父节点key 用于获取父节点dom
        let fast_obj=lst_item['fast_obj'];//当前节点的dict
        let now_dict=fast_obj.dict;//当前节点下的子节点的dicts
        let insert_id=lst_item['insert_id'];
        let now_open_num=lst_item['open_num'];//当前展开层数
        let now_open_dct=lst_item['open_dct'];
        // console.log("open 4")
        //将当前节点 插入dom中
        if (insert_id==null ){//如果是要展开的节点 那么不创建dom，仅赋值变量
            // console.log("open 5-1")
            if(path==''){
                //父节点快速查找路径
                new_father_path=null;}
            else{new_father_path=path}
            // console.log("open 5-12")
            new_fast_obj=fast_obj;
        }
        else{
            // console.log("open 5-2")
            new_fast_obj=now_dict[insert_id];
            new_fast_obj_base_info=new_fast_obj.base_info;
            // console.log("open 5-22")
            if (new_fast_obj_base_info){
                vue_name=new_fast_obj_base_info.vue_name||'a_1_0_2_0_0_lines';//要渲染的vue模板名称
                t_deepcopy_data=JSON.parse(JSON.stringify(new_fast_obj_base_info.deepcopy_data))||{};
            }else{
                vue_name="a_1_0_2_0_0_lines";
                t_deepcopy_data={};
            }
            // console.log("open 5-23")
            //获取当前节点
            if(new_path==null){
                // if (path==null){
                //     new_father_path=insert_id+'';
                // }else{
                    new_father_path=insert_id+'';
                // }
            }else{
                new_father_path=new_path+'.'+insert_id;
            }

            //新建一个dom
            new_dom=document.createElement(vue_name);
            //设置dom属性 ref值为ref_obj
            new_dom.setAttribute('ref', 'ref_obj');
            t_deepcopy_data['_space_']=lst_item.space;//退格
            t_deepcopy_data['path']=new_father_path;
            t_deepcopy_data['tree_data']=_this.data.tree_data;
            
            /*console.log("??????t_deepcopy_data",t_deepcopy_data,_this.data.tree_data)*/
            t_deepcopy_data['click_handle']=_this.data.click_handle;
            new_dom.setAttribute(':deepcopy_data',"deepcopy_data");//初始化vue模板的参数
            new_dom.setAttribute('dom_path',new_father_path);//初始化vue模板的参数

            sort_lst.push(new_father_path);
            sort_dct[new_father_path]={'el':new_dom,data:{true:true,false:false,null:null,deepcopy_data:t_deepcopy_data}}
            //检查当前节点是否处于展开状态 如果未展开 则跳过添加子节点
            if(now_open_dct.close==false){
                // console.log("flase?:",new_father_path,now_open_dct)
                t_deepcopy_data['close']=false;
            }
        }

        //检查当前节点是否处于展开状态 如果未展开 则跳过添加子节点
        if(now_open_dct.close==true){continue}
        // // if ()
        // //如果当前达到展开上限 则停止展开后续的子节点
        // if (now_open_num>=max_open_type){
        //     continue
        // }else{//设置为展开状态
        //     _this.data.fast_vue_data[new_father_path];
        //     if(new_father_path!=null){
        //         // console.log("_this.data.fast_vue_data[new_father_path],",_this.data.fast_vue_data[new_father_path],_this.data.fast_vue_data)
        //         ttime3(_this.data.fast_vue_data[new_father_path],'ref_obj',_this.data.set_open,func2_lst=[_this.data.fast_vue_data[new_father_path]]);//打开

        //     }
        // }
        // console.log("fast_obj.dict && Object.keys(fast_obj.dict).length",fast_obj.dict && Object.keys(fast_obj.dict).length,fast_obj.dict)

        //遍历子节点 将子节点添加进待处理队列中new_fast_obj
        if (new_fast_obj.dict && Object.keys(new_fast_obj.dict).length){
            // temp_lst=(Object.keys(fast_obj.dict).map(Number)).sort((a,b)=>b-a);
            temp_lst=(Object.keys(new_fast_obj.dict).map(Number)).sort((a,b)=>b-a);
            // console.log("temp_lst",temp_lst)
            temp_lst_length=temp_lst.length;
            if (!temp_lst_length){continue}
        }else{continue}
        //遍历子节点 倒序添加进处理队列
        // for (let i=temp_lst_length-1;i>=0;i--){
        for (let i=0;i<temp_lst_length;i++){
            now_id=temp_lst[i];
            lst.push({
                path:new_father_path,
                insert_id:now_id,
                fast_obj:new_fast_obj,
                space:lst_item.space+8,
                'open_num':now_open_num+1,//当前展开层数
                open_dct:now_open_dct[now_id]
            })
        }
        // console.log("temp_lst加入队列中:",temp_lst,JSON.parse(JSON.stringify(lst)))


    }
    // sort_lst.sort();//排序 ['1.1', '1.1.1', '1.2', '2.1', '2.2']
    let sort_lst2=[];
    // let sort_lst2=sort_lst;
    // console.log("sort_lst",sort_lst)
    while (sort_lst.length){ sort_lst2.push(sort_lst.pop());}
    let count_max=40;count_start=0;
    let fragment = document.createDocumentFragment(); //创建虚拟节点
    let next_dom=father_dom;
    let next_dom2=father_dom;
    // console.log("sort_lst2",father_dom__,next_dom,sort_lst2)
    while (sort_lst2.length){
        //等待页面刷新完成
        if ((count_start++)%count_max==0){
            _this.insertAfter(fragment,next_dom,father_dom__);
            await _this.sleep(16);
            fragment = document.createDocumentFragment(); //创建虚拟节点
            next_dom=next_dom2;
            // console.log("next_dom",next_dom)
            // father_dom__.appendChild(fragment);

        }
        let new_path=sort_lst2.pop();
        let vue_dct=sort_dct[new_path];
        // console.log("newpath",new_path,vue_dct)
        let new_dom=vue_dct.el;
        // _this.insertAfter(new_dom,fragment,fragment);
        fragment.appendChild(new_dom);
                //  father_dom__.appendChild(new_dom);
                 
                // _this.insertAfter(new_dom,father_dom,father_dom__);
        let new_vue=new Vue(vue_dct);
        // window.test_vue=new_vue;
        _this.data.fast_data[new_path]=new_vue.$el;
        next_dom2=new_vue.$el;
        _this.data.fast_vue_data[new_path]=new_vue;
    }
    
    _this.insertAfter(fragment,next_dom,father_dom__);
    // console.log("sort_lst",sort_lst);
    // console.log("...",fragment)
  }
  _this.data.open=async function(path){
    
    console.log("?13")
    _this.wait_run_func_class_obj.timer_start({
        func:_this.data._open,
        params:path
    })
    
    console.log("?23")
  }
  _this.data._close=async function(path){

    // parent.removeChild(nodeA.nextSibling); // 这里直接删除也可以，但为演示添加到数组后再删除  
    let test_count1=0;
    let open_dct=_this.data.open_dict;
    let sort_lst=[];//要排序的列表
    let sort_dct={};
    let father_dom__=_this.$refs.father;
    let father_dom=_this.data.fast_data[path];
    // console.log("father_dom__",father_dom__)
    // 创建一个 DocumentFragment  
    // let fragment = document.createDocumentFragment();  
    // console.log("开始展开,展开路径:",path)
    //通过path解析路径
    let obj=_this.data.data;
    let path_lst=path.split(".");
    let space=(path_lst.length-1)*8;
    if (path==''){space=-8}
    // console.log("now space:",path_lst,space)
    if (path==''){path_lst=[]}
    for (let i=0;i<path_lst.length;i++){
        obj=obj.dict[path_lst[i]];
        open_dct=open_dct[path_lst[i]];
    
    }
    let lst=[{
                "path":path,//父节点的路径
                "insert_id":null,//要插入节点的节点id
                fast_obj:obj,//父节点的 的对象
                'space':space,//缩进位数
                'open_num':0,//当前展开层数
                'open_dct':open_dct
            }];
            // console.log("open 3")
    while (lst.length){
        let temp_lst=null;temp_lst_length=null;now_id=null;new_fast_obj=null;new_father_path=null;
        let new_dom=null;new_vue=null;t_deepcopy_data=null;new_fast_obj_base_info=null;vue_name=null;
        let lst_item=lst.pop();
        let new_path=lst_item['path'];//父节点key 用于获取父节点dom
        let fast_obj=lst_item['fast_obj'];//当前节点的dict
        let now_dict=fast_obj.dict;//当前节点下的子节点的dicts
        let insert_id=lst_item['insert_id'];
        let now_open_num=lst_item['open_num'];//当前展开层数
        let now_open_dct=lst_item['open_dct'];
        // console.log(lst_item,new_path,fast_obj,now_dict,insert_id,now_open_num,now_open_dct,'xxx')
        // console.log("open 4")
        //将当前节点 插入dom中
        if (insert_id==null ){//如果是要展开的节点 那么不创建dom，仅赋值变量
            // console.log("open 5-1")
            if(path==''){
                //父节点快速查找路径
                new_father_path=null;}
            else{new_father_path=path}
            // console.log("open 5-12")
            new_fast_obj=fast_obj;
        }
        else{
            // console.log("open 5-2")
            // console.log("new_path",new_path,insert_id)
            // console.log("new_fast_obj",now_dict,insert_id)
            new_fast_obj=now_dict[insert_id];
            new_fast_obj_base_info=new_fast_obj.base_info;
            // console.log("open 5-22")
            if (new_fast_obj_base_info){
                vue_name=new_fast_obj_base_info.vue_name||'a_1_0_2_0_0_lines';//要渲染的vue模板名称
                t_deepcopy_data=new_fast_obj_base_info.deepcopy_data||{};
            }else{
                vue_name="a_1_0_2_0_0_lines";
                t_deepcopy_data={};
            }
            // console.log("open 5-23")
            //获取当前节点
            if(new_path==null){
                // if (path==null){
                //     new_father_path=insert_id+'';
                // }else{
                    new_father_path=insert_id+'';
                // }
            }else{
                new_father_path=new_path+'.'+insert_id;
            }

            sort_lst.push(new_father_path);
        }

        //检查当前节点是否处于展开状态 如果未展开 则跳过添加子节点
        // console.log("now_open_dct",now_open_dct)
        console.log("new_path",new_path,now_open_dct)
        if(now_open_dct.close==true){continue}
        //遍历子节点 将子节点添加进待处理队列中
        if (new_fast_obj.dict && Object.keys(new_fast_obj.dict).length){
            // temp_lst=(Object.keys(fast_obj.dict).map(Number)).sort((a,b)=>b-a);
            temp_lst=(Object.keys(new_fast_obj.dict).map(Number)).sort((a,b)=>b-a);
            // console.log("temp_lst",temp_lst)
            temp_lst_length=temp_lst.length;
            if (!temp_lst_length){continue}
        }else{continue}
        // console.log("new_father_path add",new_father_path,temp_lst)
        //遍历子节点 倒序添加进处理队列
        // for (let i=temp_lst_length-1;i>=0;i--){
            test_count1=test_count1+temp_lst_length;
            console.log(`当前处理数量:${temp_lst_length}/${test_count1}`,temp_lst,new_fast_obj.dict)
        for (let i=0;i<temp_lst_length;i++){
            // console.log("添加入",now_open_dct,now_id,open_dct[now_id])
            now_id=temp_lst[i];
            lst.push({
                path:new_father_path,
                insert_id:now_id,
                fast_obj:new_fast_obj,
                'open_num':now_open_num+1,//当前展开层数
                open_dct:now_open_dct[now_id]
            })
        }
        // console.log("temp_lst加入队列中:",temp_lst,JSON.parse(JSON.stringify(lst)))


    }
    // console.log("del lst:",JSON.parse(JSON.stringify(sort_lst)))
    let count_max=2330;count_start=0;
    while (sort_lst.length){
        //等待页面刷新完成
        if ((count_start++)%count_max==0){
            await _this.sleep(20);
        }
        let new_path=sort_lst.pop();
        father_dom__.removeChild(_this.data.fast_data[new_path]);
        // array.splice(indexToRemove, 1);  
        delete _this.data.fast_data[new_path];  
        delete _this.data.fast_vue_data[new_path];  
    }
    
    //关闭当前dom
    open_dct.close=true;
    
    // console.log("关闭当前dom:")
    // console.log("close !",open_dct)
    if(path!=''&&path!=null){
        ttime3(_this.data.fast_vue_data[path],'ref_obj',_this.data.set_close,func2_lst=[_this.data.fast_vue_data[path]]);//打开
    }
  }

  _this.data.close=async function(path){
    
    console.log("?14")
    _this.wait_run_func_class_obj.timer_start({
        func:_this.data._close,
        params:path
    })
    console.log("?24")

  }
}
}
);
// 



Vue.component2('a_1_0_3_0_0', {  
    template: `
    <div class="a_1_0_3_0_0" 
      @mouseenter="handleMouseEnter"  
      @mouseleave="handleMouseLeave"
      :key="refresh"
      >
        <span :style="style2" :class="data.icon_class"></span> 
        <b><span :style="style2" v-if="data.add_show"class="a_1_0_3_0_0_add icon iconfont icon-add-bold"></span></b>
        <div class="a_1_0_3_0_0_sub_menu" :style="hovertext_style">
            <div class="a_1_0_3_0_0_sub_menu_item" ref="text">
                {{ data.hovertext}}
            </div>
        </div>
    </div>
`,  
  data() {
      return {
        refresh:"1",
        show_flag:true,
        hover_flag:false,
        style:{},
        hovertext_style:"visibility:hidden;",
        style2:"",
        data:{
            test:false,
            add_show:true,
            icon_class:"",//图标类
            icon_color:"rgba(231, 231, 231, 0.6)",//图标颜色
            background:"#212121",//背景颜色
            hovercolor:"#ffffff",//高亮颜色
            hovertext:"",//移动到位后的提示文字
            click:null,//点击触发函数
        }
      };
  },
  watch:{
    "data.icon_color":function(e){
        this.setstyle2("color",e);
        this.refresh_func();
    },
    "data.background":function(e){
        this.setstyle2("background",e);
        this.refresh_func();
    },
    "data.icon_class":function(e){
        this.refresh_func();
    },
    "data.hovercolor":function(e){
        this.refresh_func();
    },
    "data.hovertext":function(e){
        this.refresh_func();
    },
  },
  methods:{
    refresh_func:function(e){
        this.refresh=this.refresh=="2"?"1":"2";
    },
    handleMouseEnter(){  
        if(this.hover_flag==false){
            this.hover_flag=true; 
            this.style2=this.style2+`color:${this.data.hovercolor};`;
            let width=get_w2({"_this":this,"ref":`text`});
            // console.log('width',width)
            this.hovertext_style=`left:-${width}`;
        }
      },  
      handleMouseLeave() {  
        if(this.hover_flag==true){
            this.hover_flag=false; 
            let style2="";
            for (let key in this.style){
                style2=style2+`${key}:${this.style[key]};`
            }
            this.hovertext_style="visibility:hidden;";
            this.style2=style2;
        }
      } ,
    setstyle2:function(name,value){
        this.style[name]=value;
        let style2="";
        for (let key in this.style){
            style2=style2+`${key}:${this.style[key]};`
        }
        this.style2=style2;
    },
    handleclick:function(event,flag=null){
        // console.log("...?")
try{this.data.click()}
catch{}
if(!flag){event.stopPropagation();}//阻止父级
    }
  },
  mounted:function(){
    if(_this.deepcopy_data.test==true){
        _this.data.icon_class="icon iconfont icon-shujuku";
        _this.data.icon_color="rgba(231, 231, 231, 0.6)";
        _this.data.background="#212121";
        _this.data.hovercolor="#ffffff";
        _this.data.hovertext="提示字符";
        // _this.data.click=function(){alert("!!!")};

    }
    // console.log("30000",_this.deepcopy_data)
} }
);

Vue.component2('a_1_0_2_1_0', {  
    template: `
        <div  :class="{ 'a_1_0_2_1_0_lines test': data.true, 'a_1_0_2_1_0_lines_onclick': data.onclick_flag }" @click="handle_click" v-show="show_flag">
        <span :style="'padding-left: '+data._space_+'px;'"></span>
        <span  v-if="data.icon1_show_flag":class="{'icon iconfont':data.true,'icon-right':data.close,'icon-down':data.close==false}"></span>
        
        <span  class="a_1_0_2_1_1_hid_line" style="color:#bcbcbc">{{data.name}}</span>
        
        <div style="display:inline-block;flex:1;">

        <div style="display:flex;
    justify-content: flex-end;
    display: flex;">
    
        <div  @click="click1($event,k)" v-for="(v,k) in data.icon_data"
        :key="k">
         <a_1_0_3_0_0 style="display: inline-block;"
         :deepcopy_data="v"></a_1_0_3_0_0>
        </div>

        </div>

        </div>

        </div>
`,
data(){
    return{
        show_flag:true,
        data:{
            onclick_flag:false,
            tree_data:{},//
            icon_data:{},
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            false:false,
            close:true,
            name:"",
            _space_:0,
        }
    }
},
methods:{
    handle_click:async function(event){
        //点击当前 高亮显示
        try{//console.log("高亮",this.data.path);
this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
        // /* console.log("我点击了一次")*/
        try{
            if(!this.data.tree_data.check_dct[this.data.path]){
                await this.data.刷新目录1();
            }
            /*console.log("?2")*/}
        catch{}

        if (this.data.click){
            try{
                this.data.click(event)
            
                // console.log("start click2")
            }
            catch{}
            return 
        }


        if (this.data.click_obj){
            try{
                lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
            
                // console.log("start click3")
            }
            catch{}
            return 
        }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    },
    click1:async function(event,k){
       /* console.log(',,,',this.data.icon_data[k].click)*/
        lhp_run_func(this.data.icon_data[k].click);
        if(!this.data.click_stop){event.stopPropagation();}//阻止父级

    }
},

mounted:function(){
    /*console.log("210的deepcopydata",_this.deepcopy_data)*/
let urls=_this.deepcopy_data.tree_data.url;
let check_dct=_this.deepcopy_data.tree_data.check_dct;
//   获取用户的前端组件库目录1列表_url:'/get_ui_dir1',
//   获取用户的前端组件库目录2列表_url:'/get_ui_dir2',
//   获取用户的前端组件库组件列表_url:'/get_ui_temp',
//   获取用户的前端组件库组件版本列表_url:'/get_ui_version',
//   添加前端目录1_url:'/add_ui_dir1',
//   添加前端目录2_url:'/add_ui_dir2',
//   添加前端组件_url:'/add_ui_temp',
//   添加前端组件版本_url:'/add_ui_version',
//   更新前端组件版本_url:'/update_ui_version',

//   获取用户的后端组件库目录1列表_url:'/get_flow_dir1',
//   获取用户的后端组件库目录2列表_url:'/get_flow_dir2',
//   获取用户的后端组件库组件列表_url:'/get_flow_temp',
//   获取用户的后端组件库组件版本列表_url:'/get_ui_version',
//   添加后端目录1_url:'/add_flow_dir1',
//   添加后端目录2_url:'/add_flow_dir2',
//   添加后端组件_url:'/add_flow_temp',
//   添加后端组件版本_url:'/add_flow_version',
//   更新后端组件版本_url:'/update_flow_version',
_this.data.获取用户的前端组件库目录1列表_flag=false;
_this.data.获取用户的前端组件库目录1列表_request=request______({method:'post',url:urls.获取用户的前端组件库目录1列表_url});
_this.data.获取用户的前端组件库目录1列表_recv=function(received_data){
    // {
    //     "type": "okk",
    //     "data": {
    //         "1": {
    //             "base_info": {
    //                 "vue_name": "a_1_0_2_1_0",
    //                 "deepcopy_data": {
    //                     "name": "未命名"
    //                 }
    //             },
    //             "dict": {}
    //         },
    //         "2": {
    //             "base_info": {
    //                 "vue_name": "a_1_0_2_1_0",
    //                 "deepcopy_data": {
    //                     "name": "未命名"
    //                 }
    //             },
    //             "dict": {}
    //         },
    //         "3": {
    //             "base_info": {
    //                 "vue_name": "a_1_0_2_1_0",
    //                 "deepcopy_data": {
    //                     "name": "未命名"
    //                 }
    //             },
    //             "dict": {}
    //         },
    //         "4": {
    //             "base_info": {
    //                 "vue_name": "a_1_0_2_1_0",
    //                 "deepcopy_data": {
    //                     "name": "未命名"
    //                 }
    //             },
    //             "dict": {}
    //         }
    //     }
    // }
    /*console.log("接收数据",received_data,_this.data.path);*/
    _this.data.tree_data.set_dict(received_data.data,_this.data.path);
    check_dct[_this.data.path]=received_data;
    _this.data.获取用户的前端组件库目录1列表_flag=true;
}
_this.data.刷新目录1=async function(){
    let count=0;
    _this.data.获取用户的前端组件库目录1列表_flag=false;
    _this.data.获取用户的前端组件库目录1列表_request({
        body_data:{},
        execute_lst:[
                      {
                        'type':'func',
                        'func':_this.data.获取用户的前端组件库目录1列表_recv,
                        'args':['received_data'],
                      },
                    ]
    });
    await time_sleep(20);
    while(1){
        count++;
        await time_sleep(1);
        if(_this.data.获取用户的前端组件库目录1列表_flag==true){break}
        if(count>500){Vue.prototype.$notify({type: 'error',message: '获取前端目录1列表失败'});break}
    }
}



_this.data.添加前端目录1_request=request______({method:'post',url:urls.添加前端目录1_url});

_this.data.添加前端目录1_recv=function(received_data){
    // {
    //     "type": "okk",
    //     "data": {
    //         "1": {
    //             "base_info": {
    //                 "vue_name": "a_1_0_2_1_0",
    //                 "deepcopy_data": {
    //                     "name": "未命名"
    //                 }
    //             },
    //             "dict": {}
    //         },
    //         "2": {
    //             "base_info": {
    //                 "vue_name": "a_1_0_2_1_0",
    //                 "deepcopy_data": {
    //                     "name": "未命名"
    //                 }
    //             },
    //             "dict": {}
    //         },
    //         "3": {
    //             "base_info": {
    //                 "vue_name": "a_1_0_2_1_0",
    //                 "deepcopy_data": {
    //                     "name": "未命名"
    //                 }
    //             },
    //             "dict": {}
    //         },
    //         "4": {
    //             "base_info": {
    //                 "vue_name": "a_1_0_2_1_0",
    //                 "deepcopy_data": {
    //                     "name": "未命名"
    //                 }
    //             },
    //             "dict": {}
    //         }
    //     }
    // }
    console.log("接收数据",received_data);
    _this.data.tree_data.set_dict(received_data,_this.data.path);
    _this.data.添加前端目录1_flag=true;
}
_this.data.添加前端目录1=async function(name){
    let count=0;
    _this.data.添加前端目录1_flag=false;
    _this.data.添加前端目录1_request({
        body_data:{name:name},
        execute_lst:[
                      {
                        'type':'func',
                        'func':_this.data.添加前端目录1_recv,
                        'args':['received_data'],
                      },
                    ]
    });
    await time_sleep(20);
    while(1){
        count++;
        await time_sleep(1);
        if(_this.data.添加前端目录1_flag==true){break}
        if(count>500){Vue.prototype.$notify({type: 'error',message: '添加前端目录1失败'});break}
    }
}





_this.data.icon_data={
    1:{
        icon_class:"icon iconfont icon-refresh",
        hovertext:"刷新目录1列表",
        add_show:false,
        click:async function(){
            /*console.log("开始刷新目录");*/
            _this.data.刷新目录1();
        }
        },
    2:{

    icon_class:"icon iconfont icon-add_dir1",
    hovertext:"添加前端目录1",
    click:async function(){
        _this.$prompt('添加前端目录1(名称)', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
          }).then(({ value }) => {
           _this.data.添加前端目录1(value);
          }).catch(() => {
            _this.$message({
              type: 'info',
              message: '取消输入'
            });       
          });},
    },
}


}

})

Vue.component2('a_1_0_2_10_1', {  
    template: `
        <div  :class="{ 'a_1_0_2_10_1_lines test': data.true, 'a_1_0_2_10_1_lines_onclick': data.onclick_flag }" @click="handle_click" v-show="show_flag">
        <span :style="'padding-left: '+data._space_+'px;'"></span>
        <span  v-if="data.icon1_show_flag":class="{'icon iconfont':data.true,'icon-right':data.close,'icon-down':data.close==false}"></span>
        
        <span  class="a_1_0_2_10_1_hid_line" style="color:#bcbcbc">{{data.name}}</span>
        <div style="display:inline-block;flex:1;">
        <div style="display:flex;
    justify-content: flex-end;
    display: flex;">
    
        <div  @click="click1($event,k)" v-for="(v,k) in data.icon_data"
        :key="k">
         <a_1_0_3_0_0 style="display: inline-block;"
         :deepcopy_data="v"></a_1_0_3_0_0>
        </div>
        </div>
        </div>
        </div>
`,
data(){
    return{
        show_flag:true,
        data:{
            onclick_flag:false,
            tree_data:{},//
            icon_data:{},
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            false:false,
            close:true,
            name:"",
            _space_:0,
        }
    }
},
methods:{

    handle_click:async function(event){
        //点击当前 高亮显示
        try{//console.log("高亮",this.data.path);
this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
        /* console.log("我点击了一次")*/
        try{
            /* console.log("?")*/
            if(!this.data.tree_data.check_dct[this.data.path]){
                await this.data.刷新后端组件();
            }
            /*console.log("?2")*/}
        catch{}

        if (this.data.click){
            try{
                this.data.click(event)
            
                // console.log("start click2")
            }
            catch{}
            return 
        }


        if (this.data.click_obj){
            try{
                lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
            
                // console.log("start click3")
            }
            catch{}
            return 
        }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    },
    click1:async function(event,k){
       /* console.log(',,,',this.data.icon_data[k].click)*/
        lhp_run_func(this.data.icon_data[k].click);
        if(!this.data.click_stop){event.stopPropagation();}//阻止父级

    }
},

mounted:function(){
    /*console.log("210的deepcopydata",_this.deepcopy_data)*/
    let urls=_this.deepcopy_data.tree_data.url;
    let check_dct=_this.deepcopy_data.tree_data.check_dct;
//   获取用户的后端组件库组件列表_url:'/get_ui_dir1',
//   获取用户的后端组件库组件列表_url:'/get_ui_dir2',
//   获取用户的后端组件库组件列表_url:'/get_ui_temp',
//   获取用户的后端组件库组件版本列表_url:'/get_ui_version',
//   添加后端组件_url:'/add_ui_dir1',
//   添加后端组件_url:'/add_ui_dir2',
//   添加后端组件_url:'/add_ui_temp',
//   添加后端组件版本_url:'/add_ui_version',
//   更新后端组件版本_url:'/update_ui_version',
//   修改后端目录2属性_url:'/change_ui_dir1'
//   修改后端目录2属性_url:'/change_ui_dir2'
//   修改后端目录2属性_url:'/change_ui_temp'



//   获取用户的后端组件库目录2列表_url:'/get_flow_dir1',
//   获取用户的后端组件库目录2列表_url:'/get_flow_dir2',
//   获取用户的后端组件库组件列表_url:'/get_flow_temp',
//   获取用户的后端组件库组件版本列表_url:'/get_ui_version',
//   添加后端目录2_url:'/add_flow_dir1',
//   添加后端目录2_url:'/add_flow_dir2',
//   添加后端组件_url:'/add_flow_temp',
//   添加后端组件版本_url:'/add_flow_version',
//   更新后端组件版本_url:'/update_flow_version',
_this.data.获取用户的后端组件库组件列表_flag=false;
_this.data.获取用户的后端组件库组件列表_request=request______({method:'post',url:urls.获取用户的后端组件库组件列表_url});
_this.data.获取用户的后端组件库组件列表_recv=function(received_data){
    /*console.log("接收数据",received_data,_this.data.path);*/
    _this.data.tree_data.set_dict(received_data.data,_this.data.path);
    check_dct[_this.data.path]=received_data;
    _this.data.获取用户的后端组件库组件列表_flag=true;
}
_this.data.刷新后端组件=async function(){
    if(!_this.data.dir1_id){
        let path_l=_this.data.path.split(".");
        _this.data.dir1_id=path_l[path_l.length-2];
        _this.data.dir2_id=path_l[path_l.length-1];
    }
    let count=0;
    _this.data.获取用户的后端组件库组件列表_flag=false;
    _this.data.获取用户的后端组件库组件列表_request({
        body_data:{dir1_id:_this.data.dir1_id,dir2_id:_this.data.dir2_id},
        execute_lst:[
                      {
                        'type':'func',
                        'func':_this.data.获取用户的后端组件库组件列表_recv,
                        'args':['received_data'],
                      },
                    ]
    });
    await time_sleep(20);
    while(1){
        count++;
        await time_sleep(1);
        if(_this.data.获取用户的后端组件库组件列表_flag==true){break}
        if(count>500){Vue.prototype.$notify({type: 'error',message: '获取后端目录2列表失败'});break}
    }
}



_this.data.添加后端组件_request=request______({method:'post',url:urls.添加后端组件_url});

_this.data.添加后端组件_recv=function(received_data){
    console.log("接收数据",received_data);
    _this.data.tree_data.set_dict(received_data,_this.data.path);
    _this.data.添加后端组件_flag=true;
}
_this.data.添加后端组件=async function(name){
    if(!_this.data.dir1_id){
        let path_l=_this.data.path.split(".");
        _this.data.dir1_id=path_l[path_l.length-2];
        _this.data.dir2_id=path_l[path_l.length-1];
    }
    let count=0;
    _this.data.添加后端组件_flag=false;
    _this.data.添加后端组件_request({
        body_data:{name:name,dir1_id:_this.data.dir1_id,dir2_id:_this.data.dir2_id},
        execute_lst:[
                      {
                        'type':'func',
                        'func':_this.data.添加后端组件_recv,
                        'args':['received_data'],
                      },
                    ]
    });
    await time_sleep(20);
    while(1){
        count++;
        await time_sleep(1);
        if(_this.data.添加后端组件_flag==true){break}
        if(count>500){Vue.prototype.$notify({type: 'error',message: '添加后端组件失败'});break}
    }
}




_this.data.修改后端目录2属性_request=request______({method:'post',url:urls.修改后端目录2属性_url});

findKeydeepcopy=function (obj, path = []){
    // 遍历对象的所有属性  
    for (let key in obj) {  
        if (obj.hasOwnProperty(key)) {  
            // 更新当前路径  
            let currentPath = [...path, key];  
  
            // 如果当前属性的 key 是 'aaa'，返回路径  
            if (key === 'deepcopy_data') {  
                return currentPath;  
            }  
  
            // 如果当前属性是对象，递归调用  
            if (typeof obj[key] === 'object' && obj[key] !== null) {  
                let result = findKeydeepcopy(obj[key], currentPath);  
                if (result) {  
                    return result;  
                }  
            }  
        }  
    }  
  
    // 如果没有找到 key 为 'aaa' 的对象，返回 null  
    return null;  
}  
_this.data.修改后端目录2属性_recv=function(received_data){
    console.log("接收数据",received_data);
    _this.data.修改后端目录2属性_flag=true;
    let lst=findKeydeepcopy(received_data);
    let copy_data=received_data;
    for(let i=0;i<lst.length;i++){copy_data=copy_data[lst[i]]}
    _this.data.tree_data.change_deepcopy_data(_this.data.path,copy_data);
}
_this.data.修改后端目录2属性=async function(name){
    if(!_this.data.dir1_id){
        let path_l=_this.data.path.split(".");
        _this.data.dir1_id=path_l[path_l.length-2];
        _this.data.dir2_id=path_l[path_l.length-1];
    }
    let count=0;
    _this.data.修改后端目录2属性_flag=false;
    _this.data.修改后端目录2属性_request({
        body_data:{name:name,dir1_id:_this.data.dir1_id,dir2_id:_this.data.dir2_id},
        execute_lst:[
                      {
                        'type':'func',
                        'func':_this.data.修改后端目录2属性_recv,
                        'args':['received_data'],
                      },
                    ]
    });
    await time_sleep(20);
    while(1){
        count++;
        await time_sleep(1);
        if(_this.data.修改后端目录2属性_flag==true){break}
        if(count>500){Vue.prototype.$notify({type: 'error',message: '修改后端目录2属性失败'});break}
    }
}


_this.data.icon_data={
    
    297:{
      icon_class:"icon iconfont icon-fuzhi",
      hovertext:"复制目录2id",
      add_show:false,
      click:async function(){
        if(!_this.data.dir1_id){
            let path_l=_this.data.path.split(".");
            _this.data.dir1_id=path_l[path_l.length-2];
            _this.data.dir2_id=path_l[path_l.length-1];
        }
      let copy_data=`a_${cookie_read("easyedit_userid")}_${_this.data.dir1_id}_${_this.data.dir2_id}`
        copy_text(copy_data); 
        Vue.prototype.$notify({type: 'success',message: '已拷贝:'+copy_data})
  
    },
  },
    330:{
        icon_class:"icon iconfont icon-write",
        hovertext:"修改后端目录2属性",
        add_show:false,
        click:async function(){
            _this.$prompt('修改后端目录2(名称)', '提示', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
              }).then(({ value }) => {
               _this.data.修改后端目录2属性(value);
              }).catch(() => {
                _this.$message({
                  type: 'info',
                  message: '取消输入'
                });       
              });},
        },
    331:{
        icon_class:"icon iconfont icon-refresh",
        hovertext:"刷新后端组件列表",
        add_show:false,
        click:async function(){
            /*console.log("开始刷新目录");*/
            _this.data.刷新后端组件();
        }
        },
    332:{

    icon_class:"icon iconfont icon-add_temp",
    hovertext:"添加后端组件",
    click:async function(){
        _this.$prompt('添加后端组件(名称)', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
          }).then(({ value }) => {
           _this.data.添加后端组件(value);
          }).catch(() => {
            _this.$message({
              type: 'info',
              message: '取消输入'
            });       
          });},
    },
}


}

})

Vue.component2('a_1_0_2_11_1', {  
    template: `
        <div  :class="{ 'a_1_0_2_11_1_lines test': data.true, 'a_1_0_2_11_1_lines_onclick': data.onclick_flag }" @click="handle_click" v-show="show_flag">
        <span :style="'padding-left: '+data._space_+'px;'"></span>
        <span  v-if="data.icon1_show_flag":class="{'icon iconfont':data.true,'icon-right':data.close,'icon-down':data.close==false}"></span>
        
        <span  class="a_1_0_2_11_1_hid_line" style="color:#bcbcbc">{{data.name}}</span>
        <div style="display:inline-block;flex:1;">
        <div style="display:flex;
    justify-content: flex-end;
    display: flex;">
    
        <div  @click="click1($event,k)" v-for="(v,k) in data.icon_data"
        :key="k">
         <a_1_0_3_0_0 style="display: inline-block;"
         :deepcopy_data="v"></a_1_0_3_0_0>
        </div>
        </div>
        </div>
        </div>
`,
data(){
    return{
        show_flag:true,
        data:{
            onclick_flag:false,
            tree_data:{},//
            icon_data:{},
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            false:false,
            close:true,
            name:"",
            _space_:0,
        }
    }
},
methods:{

    handle_click:async function(event){
        //点击当前 高亮显示
        try{//console.log("高亮",this.data.path);
this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
        /* console.log("我点击了一次")*/
        try{
            /* console.log("?")*/
            if(!this.data.tree_data.check_dct[this.data.path]){
                await this.data.刷新后端组件();
            }
            /*console.log("?2")*/}
        catch{}

        if (this.data.click){
            try{
                this.data.click(event)
            
                // console.log("start click2")
            }
            catch{}
            return 
        }


        if (this.data.click_obj){
            try{
                lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
            
                // console.log("start click3")
            }
            catch{}
            return 
        }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    },
    click1:async function(event,k){
       /* console.log(',,,',this.data.icon_data[k].click)*/
        lhp_run_func(this.data.icon_data[k].click);
        if(!this.data.click_stop){event.stopPropagation();}//阻止父级

    }
},

mounted:function(){
    /*console.log("210的deepcopydata",_this.deepcopy_data)*/
    let urls=_this.deepcopy_data.tree_data.url;
    let check_dct=_this.deepcopy_data.tree_data.check_dct;
//   获取用户的后端组件库组件版本列表_url:'/get_ui_dir1',
//   获取用户的后端组件库组件版本列表_url:'/get_ui_dir2',
//   获取用户的后端组件库组件版本列表_url:'/get_ui_temp',
//   获取用户的后端组件库组件版本列表_url:'/get_ui_version',
//   添加后端组件版本_url:'/add_ui_dir1',
//   添加后端组件版本_url:'/add_ui_dir2',
//   添加后端组件版本_url:'/add_ui_temp',
//   添加后端组件版本版本_url:'/add_ui_version',
//   更新后端组件版本_url:'/update_ui_version',
//   修改后端组件属性_url:'/change_ui_dir1'
//   修改后端组件属性_url:'/change_ui_dir2'
//   修改后端组件属性_url:'/change_ui_temp'



//   获取用户的后端组件库目录2列表_url:'/get_flow_dir1',
//   获取用户的后端组件库目录2列表_url:'/get_flow_dir2',
//   获取用户的后端组件库组件列表_url:'/get_flow_temp',
//   获取用户的后端组件库组件版本列表_url:'/get_ui_version',
//   添加后端目录2_url:'/add_flow_dir1',
//   添加后端目录2_url:'/add_flow_dir2',
//   添加后端组件_url:'/add_flow_temp',
//   添加后端组件版本_url:'/add_flow_version',
//   更新后端组件版本_url:'/update_flow_version',
_this.data.获取用户的后端组件库组件版本列表_flag=false;
_this.data.获取用户的后端组件库组件版本列表_request=request______({method:'post',url:urls.获取用户的后端组件库组件版本列表_url});
_this.data.获取用户的后端组件库组件版本列表_recv=function(received_data){
    /*console.log("接收数据",received_data,_this.data.path);*/
    _this.data.tree_data.set_dict(received_data.data,_this.data.path);
    check_dct[_this.data.path]=received_data;
    _this.data.获取用户的后端组件库组件版本列表_flag=true;
}
_this.data.刷新后端组件=async function(){

    if(!_this.data.dir1_id){
        let path_l=_this.data.path.split(".");
        _this.data.dir1_id=path_l[path_l.length-3];
        _this.data.dir2_id=path_l[path_l.length-2];
        _this.data.temp_id=path_l[path_l.length-1];
    }
    let count=0;
    _this.data.获取用户的后端组件库组件版本列表_flag=false;
    _this.data.获取用户的后端组件库组件版本列表_request({
        body_data:{dir1_id:_this.data.dir1_id,dir2_id:_this.data.dir2_id,temp_id:_this.data.temp_id},
        execute_lst:[
                      {
                        'type':'func',
                        'func':_this.data.获取用户的后端组件库组件版本列表_recv,
                        'args':['received_data'],
                      },
                    ]
    });
    await time_sleep(20);
    while(1){
        count++;
        await time_sleep(1);
        if(_this.data.获取用户的后端组件库组件版本列表_flag==true){break}
        if(count>500){Vue.prototype.$notify({type: 'error',message: '获取后端目录2列表失败'});break}
    }
}



_this.data.添加后端组件版本_request=request______({method:'post',url:urls.添加后端组件版本_url});

_this.data.添加后端组件版本_recv=function(received_data){
    console.log("接收数据",received_data);
    _this.data.tree_data.set_dict(received_data,_this.data.path);
    _this.data.添加后端组件版本_flag=true;
}
_this.data.添加后端组件版本=async function(name){
    if(!_this.data.dir1_id){
        let path_l=_this.data.path.split(".");
        _this.data.dir1_id=path_l[path_l.length-3];
        _this.data.dir2_id=path_l[path_l.length-2];
        _this.data.temp_id=path_l[path_l.length-1];
    }
    let count=0;
    _this.data.添加后端组件版本_flag=false;
    _this.data.添加后端组件版本_request({
        body_data:{version_name:name,dir1_id:_this.data.dir1_id,dir2_id:_this.data.dir2_id,temp_id:_this.data.temp_id},
        execute_lst:[
                      {
                        'type':'func',
                        'func':_this.data.添加后端组件版本_recv,
                        'args':['received_data'],
                      },
                    ]
    });
    await time_sleep(20);
    while(1){
        count++;
        await time_sleep(1);
        if(_this.data.添加后端组件版本_flag==true){break}
        if(count>500){Vue.prototype.$notify({type: 'error',message: '添加后端组件版本失败'});break}
    }
}




_this.data.修改后端组件属性_request=request______({method:'post',url:urls.修改后端组件属性_url});

findKeydeepcopy=function (obj, path = []){
    // 遍历对象的所有属性  
    for (let key in obj) {  
        if (obj.hasOwnProperty(key)) {  
            // 更新当前路径  
            let currentPath = [...path, key];  
  
            // 如果当前属性的 key 是 'aaa'，返回路径  
            if (key === 'deepcopy_data') {  
                return currentPath;  
            }  
  
            // 如果当前属性是对象，递归调用  
            if (typeof obj[key] === 'object' && obj[key] !== null) {  
                let result = findKeydeepcopy(obj[key], currentPath);  
                if (result) {  
                    return result;  
                }  
            }  
        }  
    }  
  
    // 如果没有找到 key 为 'aaa' 的对象，返回 null  
    return null;  
}  
_this.data.修改后端组件属性_recv=function(received_data){
    console.log("接收数据",received_data);
    _this.data.修改后端组件属性_flag=true;
    let lst=findKeydeepcopy(received_data);
    let copy_data=received_data;
    for(let i=0;i<lst.length;i++){copy_data=copy_data[lst[i]]}
    _this.data.tree_data.change_deepcopy_data(_this.data.path,copy_data);
}
_this.data.修改后端组件属性=async function(name){

    if(!_this.data.dir1_id){
        let path_l=_this.data.path.split(".");
        _this.data.dir1_id=path_l[path_l.length-3];
        _this.data.dir2_id=path_l[path_l.length-2];
        _this.data.temp_id=path_l[path_l.length-1];
    }
    let count=0;
    _this.data.修改后端组件属性_flag=false;
    _this.data.修改后端组件属性_request({
        body_data:{name:name,dir1_id:_this.data.dir1_id,dir2_id:_this.data.dir2_id,temp_id:_this.data.temp_id},
        execute_lst:[
                      {
                        'type':'func',
                        'func':_this.data.修改后端组件属性_recv,
                        'args':['received_data'],
                      },
                    ]
    });
    await time_sleep(20);
    while(1){
        count++;
        await time_sleep(1);
        if(_this.data.修改后端组件属性_flag==true){break}
        if(count>500){Vue.prototype.$notify({type: 'error',message: '修改后端组件属性失败'});break}
    }
}


_this.data.icon_data={
    330:{
        icon_class:"icon iconfont icon-write",
        hovertext:"修改后端组件属性",
        add_show:false,
        click:async function(){
            _this.$prompt('修改后端组件(名称)', '提示', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
              }).then(({ value }) => {
               _this.data.修改后端组件属性(value);
              }).catch(() => {
                _this.$message({
                  type: 'info',
                  message: '取消输入'
                });       
              });},
        },
    331:{
        icon_class:"icon iconfont icon-refresh",
        hovertext:"刷新后端组件版本列表",
        add_show:false,
        click:async function(){
            /*console.log("开始刷新目录");*/
            _this.data.刷新后端组件();
        }
        },
    332:{

    icon_class:"icon iconfont icon-add_version",
    hovertext:"添加后端组件版本",
    click:async function(){
        _this.$prompt('添加后端组件版本版本(名称)', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
          }).then(({ value }) => {
           _this.data.添加后端组件版本(value);
          }).catch(() => {
            _this.$message({
              type: 'info',
              message: '取消输入'
            });       
          });},
    },
}


}

})

Vue.component2('a_1_0_2_12_1', {  
    template: `
        <div  :class="{ 'a_1_0_2_12_1_lines test': data.true, 'a_1_0_2_12_1_lines_onclick': data.onclick_flag }" @click="handle_click" v-show="show_flag">
        <span :style="'padding-left: '+data._space_+'px;'"></span>
        <span  v-if="data.icon1_show_flag" class="icon iconfont icon-add_version"></span>
        
        <span  class="a_1_0_2_12_1_hid_line" style="color:#bcbcbc">{{data.version}}.{{data.version_name}}</span>
        <div style="display:inline-block;flex:1;">
        <div style="display:flex;
    justify-content: flex-end;
    display: flex;">
    
        <div  @click="click1($event,k)" v-for="(v,k) in data.icon_data"
        :key="k">
         <a_1_0_3_0_0 style="display: inline-block;"
         :deepcopy_data="v"></a_1_0_3_0_0>
        </div>
        </div>
        </div>


        <el-dialog
        title="更新代码(上传组件文件夹)"
        :visible.sync="update_my_temp_from_flag"
        width="30%">
        <input ref="add_temp" type="file" webkitdirectory directory multiple>
        <span slot="footer" class="dialog-footer">
          <el-button @click="update_my_temp_from_flag = false">取消</el-button>
          <el-button @click="update">确 定</el-button>
        </span>
      </el-dialog>


















        </div>
`,
data(){
    return{
        update_my_temp_from_flag:false,
        show_flag:true,
        data:{
          version_name:'',
          version:"",
          onclick_flag:false,
            tree_data:{},//
            icon_data:{},
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            false:false,
            close:true,
            name:"",
            _space_:0,
        }
    }
},
methods:{

    update:function(){this.data.update_temp()},
    handle_click:async function(event){
      //点击当前 高亮显示
      try{console.log("高亮",this.data.path);
this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
        return
        /* console.log("我点击了一次")*/
        try{
            /* console.log("?")*/
            if(!this.data.tree_data.check_dct[this.data.path]){
                await this.data.刷新后端组件();
            }
            /*console.log("?2")*/}
        catch{}

        if (this.data.click){
            try{
                this.data.click(event)
            
                // console.log("start click2")
            }
            catch{}
            return 
        }


        if (this.data.click_obj){
            try{
                lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
            
                // console.log("start click3")
            }
            catch{}
            return 
        }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    },
    click1:async function(event,k){
       /* console.log(',,,',this.data.icon_data[k].click)*/
        lhp_run_func(this.data.icon_data[k].click);
        if(!this.data.click_stop){event.stopPropagation();}//阻止父级

    }
},

mounted:function(){
    /*console.log("210的deepcopydata",_this.deepcopy_data)*/
    let urls=_this.deepcopy_data.tree_data.url;
    let check_dct=_this.deepcopy_data.tree_data.check_dct;
_this.data.获取用户的后端组件库组件版本列表_flag=false;
_this.data.获取用户的后端组件库组件版本列表_request=request______({method:'post',url:urls.获取用户的后端组件库组件版本列表_url});
_this.data.获取用户的后端组件库组件版本列表_recv=function(received_data){
    /*console.log("接收数据",received_data,_this.data.path);*/
    _this.data.tree_data.set_dict(received_data.data,_this.data.path);
    check_dct[_this.data.path]=received_data;
    _this.data.获取用户的后端组件库组件版本列表_flag=true;
}
_this.data.刷新后端组件=async function(){

    if(!_this.data.dir1_id){
        let path_l=_this.data.path.split(".");
        _this.data.dir1_id=path_l[path_l.length-3];
        _this.data.dir2_id=path_l[path_l.length-2];
        _this.data.temp_id=path_l[path_l.length-1];
    }
    let count=0;
    _this.data.获取用户的后端组件库组件版本列表_flag=false;
    _this.data.获取用户的后端组件库组件版本列表_request({
        body_data:{dir1_id:_this.data.dir1_id,dir2_id:_this.data.dir2_id,temp_id:_this.data.temp_id,version_id:_this.data.version_id},
        execute_lst:[
                      {
                        'type':'func',
                        'func':_this.data.获取用户的后端组件库组件版本列表_recv,
                        'args':['received_data'],
                      },
                    ]
    });
    await time_sleep(20);
    while(1){
        count++;
        await time_sleep(1);
        if(_this.data.获取用户的后端组件库组件版本列表_flag==true){break}
        if(count>500){Vue.prototype.$notify({type: 'error',message: '获取后端目录2列表失败'});break}
    }
}






_this.data.修改后端组件版本属性_request=request______({method:'post',url:urls.修改后端组件版本属性_url});

findKeydeepcopy=function (obj, path = []){
  // 遍历对象的所有属性  
  for (let key in obj) {  
      if (obj.hasOwnProperty(key)) {  
          // 更新当前路径  
          let currentPath = [...path, key];  

          // 如果当前属性的 key 是 'aaa'，返回路径  
          if (key === 'deepcopy_data') {  
              return currentPath;  
          }  

          // 如果当前属性是对象，递归调用  
          if (typeof obj[key] === 'object' && obj[key] !== null) {  
              let result = findKeydeepcopy(obj[key], currentPath);  
              if (result) {  
                  return result;  
              }  
          }  
      }  
  }  

  // 如果没有找到 key 为 'aaa' 的对象，返回 null  
  return null;  
}  
_this.data.修改后端组件版本属性_recv=function(received_data){
    console.log("接收数据",received_data);
    _this.data.修改后端组件版本属性_flag=true;
    let lst=findKeydeepcopy(received_data);
    let copy_data=received_data;
    for(let i=0;i<lst.length;i++){copy_data=copy_data[lst[i]]}
    _this.data.tree_data.change_deepcopy_data(_this.data.path,copy_data);
}
_this.data.修改后端组件版本属性=async function(name){

    if(!_this.data.dir1_id){
        let path_l=_this.data.path.split(".");
        _this.data.dir1_id=path_l[path_l.length-4];
        _this.data.dir2_id=path_l[path_l.length-3];
        _this.data.temp_id=path_l[path_l.length-2];
        _this.data.version_id=path_l[path_l.length-1];
    }
    let count=0;
    _this.data.修改后端组件版本属性_flag=false;
    _this.data.修改后端组件版本属性_request({
        body_data:{name:name,dir1_id:_this.data.dir1_id,dir2_id:_this.data.dir2_id,temp_id:_this.data.temp_id,version_id:_this.data.version_id},
        execute_lst:[
                      {
                        'type':'func',
                        'func':_this.data.修改后端组件版本属性_recv,
                        'args':['received_data'],
                      },
                    ]
    });
    await time_sleep(20);
    while(1){
        count++;
        await time_sleep(1);
        if(_this.data.修改后端组件版本属性_flag==true){break}
        if(count>500){Vue.prototype.$notify({type: 'error',message: '修改后端组件版本属性失败'});break}
    }
}
//生成随机数
_this.data.generateRandomString=function (length){  
  if (_this.data.generateRandomString_val){
    return _this.data.generateRandomString_val
  }
  const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';  
  let result = '';  
  const charactersLength = characters.length;  
  for (let i = 0; i < length; i++) {  
      const randomIndex = Math.floor(Math.random() * charactersLength);  
      result += characters[randomIndex];  
  }  
  _this.data.generateRandomString_val=result
  return result;  
}  
_this.data.icon_data={
  297:{
    icon_class:"icon iconfont icon-fuzhi",
    hovertext:"复制组件id",
    add_show:false,
    click:async function(){
      if(!_this.data.dir1_id){
        let path_l=_this.data.path.split(".");
        _this.data.dir1_id=path_l[path_l.length-4];
        _this.data.dir2_id=path_l[path_l.length-3];
        _this.data.temp_id=path_l[path_l.length-2];
        _this.data.version_id=path_l[path_l.length-1];
    }
    let copy_data=`a_${cookie_read("easyedit_userid")}_${_this.data.dir1_id}_${_this.data.dir2_id}_${_this.data.temp_id}_${_this.data.version_id}`
      copy_text(copy_data); 
      Vue.prototype.$notify({type: 'success',message: '已拷贝:'+copy_data})

  },
},
  
  298:{
    icon_class:"icon iconfont icon-write",
    hovertext:"修改后端组件版本属性",
    add_show:false,
    click:async function(){
        _this.$prompt('修改后端组件(名称)', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
          }).then(({ value }) => {
           _this.data.修改后端组件版本属性(value);
          }).catch(() => {
            _this.$message({
              type: 'info',
              message: '取消输入'
            });       
          });},
    },
  299:{
      icon_class:"icon iconfont icon-download",
      hovertext:"下载此组件代码",
      add_show:false,
      click:async function(){
        
    if(!_this.data.dir1_id){
      let path_l=_this.data.path.split(".");
      _this.data.dir1_id=path_l[path_l.length-4];
      _this.data.dir2_id=path_l[path_l.length-3];
      _this.data.temp_id=path_l[path_l.length-2];
      _this.data.version_id=path_l[path_l.length-1];
  }
    
        response4 = await fetch(urls.下载用户的后端组件库组件版本_url, {  
          method: 'POST', // 指定请求方法为 POST  
          headers: {  
            'Content-Type': 'application/json', // 设置请求头，表明发送的是 JSON 数据  
            // 可能还需要设置其他请求头，比如 'Authorization' 用于身份验证  
          },  
          body: JSON.stringify({"down_user_id":cookie_read("easyedit_userid"),"dir1_id":_this.data.dir1_id,"dir2_id":_this.data.dir2_id,"temp_id":_this.data.temp_id,"version_id":_this.data.version_id,"request_id":_this.data.generateRandomString(10)}), // 将 JSON 字符串作为请求体发送  
        });  
          data4 = await response4.json();
          if(data4.type=='wait'){

            Vue.prototype.$notify({type: 'info',message: '下载人数过多，当前排队:'+data4.num})
          }else{
            window.location.href =data4.down_url;
          }
          
          },
      },
    // 2:{
    //     icon_class:"icon iconfont icon-refresh",
    //     hovertext:"刷新后端组件版本列表",
    //     add_show:false,
    //     click:async function(){
    //         /*console.log("开始刷新目录");*/
    //         _this.data.刷新后端组件();
    //     }
    //     },
    300:{

    icon_class:"icon iconfont icon-upload",
    hovertext:"更新代码",
    add_show:false,
    click:async function(){
        // console.log("update_my_temp_from_flag",_this.update_my_temp_from_flag)
    //初始化上传文件夹回调函数
    if(!_this.eeeeeeeeeess){
        // console.log("开始初始化")
      ttime3(_this,"add_temp",function(){
        // console.log("...>?")
          _this.$refs.add_temp.addEventListener('change', function(event) {  
            // 在这里执行你的函数  
            // console.log("_this.files","event.target.files)
            _this.files=event.target.files; 
            // console.log("_this.files",_this.files)
            if(!_this.data.dir1_id){
                let path_l=_this.data.path.split(".");
                _this.data.dir1_id=path_l[path_l.length-4];
                _this.data.dir2_id=path_l[path_l.length-3];
                _this.data.temp_id=path_l[path_l.length-2];
                _this.data.version_id=path_l[path_l.length-1];
            }
        }); 
      })
      _this.eeeeeeeeeess=true;
    }
    _this.update_my_temp_from_flag=true;



},
    },
}
_this.data.update_temp=async function(){
       
      let MAX_SIZE=10*1024*1024;
        // 创建一个 FormData 实例  
      add_my_temp_formData = new FormData();  
      let max_size=0;
      // 遍历文件列表，将文件添加到 formData  
      let i=0;
    //   console.log("_this.files",_this.files)
    //   window.ddddd=_this.files
      for (let file of _this.files) {  
        i++;
        max_size=max_size+file.size;
        if (max_size>MAX_SIZE){
          this.$message({
            type: 'info',
            message: '超过上传最大值:'+MAX_SIZE/1024/1024+'M'
          });
          return
        }
        add_my_temp_formData.append('file_'+i, file); // 'files[]' 是服务器接收文件时可能使用的字段名，具体取决于后端配置  
        add_my_temp_formData.append(`file_path${i}`,file.webkitRelativePath);
      }  
      // 添加额外的参数  
      add_my_temp_formData.append('type', 'add_my_temp');  
      add_my_temp_formData.append('dir1_id',_this.data.dir1_id);  
      add_my_temp_formData.append('dir2_id',_this.data.dir2_id);  
      add_my_temp_formData.append('temp_id', _this.data.temp_id);  
      add_my_temp_formData.append('version_id', _this.data.version_id);  
      console.log("add_my_temp_formData",add_my_temp_formData)
    //   add_my_temp_formData.append("path",file.webkitRelativePath)
      // 发送请求到服务器  
      try {  
        const response = await fetch(urls.更新后端组件版本代码_url, {  
          method: 'POST',  
          body: add_my_temp_formData,  
        });  
  
        if (!response.ok) {  
          throw new Error('Network response was not ok');  
        }  
  
        const received_data = await response.json(); // 假设服务器返回 JSON 数据  
        if(received_data.type=="success"){
            
          Vue.prototype.$notify({type: 'success',message: received_data.message||'操作成功'})
        }else{
            
          Vue.prototype.$notify({type: 'error',message: received_data.message||'操作失败'})
        }
      _this.update_my_temp_from_flag=false;//关闭对话框
    
      } catch (error) {  
        console.error('Error:', error);  
      } 
}

}

})

Vue.component2('a_1_0_2_13_1', {  
    template: `
        <div  :class="{ 'a_1_0_2_13_1_lines test': data.true, 'a_1_0_2_13_1_lines_onclick': data.onclick_flag }" @click="handle_click" v-show="show_flag">
        <span :style="'padding-left: '+data._space_+'px;'"></span>
        <span  v-if="data.icon1_show_flag":class="{'icon iconfont':data.true,'icon-right':data.close,'icon-down':data.close==false}"></span>
        
        <span  class="a_1_0_2_13_1_hid_line" style="color:#bcbcbc">{{data.name}}</span>
        <div style="display:inline-block;flex:1;">
        <div style="display:flex;
    justify-content: flex-end;
    display: flex;">
    
        <div  @click="click1($event,k)" v-for="(v,k) in data.icon_data"
        :key="k">
         <a_1_0_3_0_0 style="display: inline-block;"
         :deepcopy_data="v"></a_1_0_3_0_0>
        </div>
        </div>
        </div>
        </div>
`,
data(){
    return{
        show_flag:true,
        data:{
            onclick_flag:false,
            tree_data:{},//
            icon_data:{},
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            false:false,
            close:true,
            name:"",
            _space_:0,
        }
    }
},
methods:{
    handle_click:async function(event){
        //点击当前 高亮显示
        try{//console.log("高亮",this.data.path);
this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
        // /* console.log("我点击了一次")*/
        try{
            if(!this.data.tree_data.check_dct[this.data.path]){
                await this.data.刷新();
            }
            /*console.log("?2")*/}
        catch{}

        if (this.data.click){
            try{
                this.data.click(event)
            
                // console.log("start click2")
            }
            catch{}
            return 
        }


        if (this.data.click_obj){
            try{
                lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
            
                // console.log("start click3")
            }
            catch{}
            return 
        }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    },
    click1:async function(event,k){
       /* console.log(',,,',this.data.icon_data[k].click)*/
        lhp_run_func(this.data.icon_data[k].click);
        if(!this.data.click_stop){event.stopPropagation();}//阻止父级

    }
},

mounted:function(){
let urls=_this.deepcopy_data.tree_data.url;
// 获取我的项目目录_url:'/get_project_info',
// 获取我的他人目录_url:'/get_project_info2',
// 获取我的项目XXX目录下的所有项目信息_url:'/get_my_project_all',

// 获取他人项目XXX目录下的所有项目信息_url:'/get_other_project_all',
// 获取他人项目列表_url:'/get_other_projects',
// 新建项目目录_url:'/create_project_dir',

// 删除我的项目目录_url:'/del_project_dir',
// 新建我的项目_url:'/create_project',
// 保存项目_url:'/save_project',
// 删除我的项目_url:'/del_project',
// 修改我的项目名称_url:'/change_project',
// 查看项目参与者目录_url:'/project_user',

// 添加别人参与我的项目_url:'/add_other_project',
// 删除别人参与我的项目_url:'/del_other_project',
// 运行流程_url:'/run_flow',
// 结束流程_url:'/stop_flow',
_this.data.获取我的项目目录_flag=false;
_this.data.获取我的项目目录_request=request______({method:'post',url:urls.获取我的项目目录_url});
_this.data.获取我的项目目录_recv=function(received_data){
    // {
    //     "type": "okk",
    //     "data": {
    //         "1": {
            //     "base_info": {
            //         "vue_name": "a_1_0_2_13_1",
            //         "deepcopy_data": {
            //             "name": "未命名"
            //         }
            //     },
            //     "dict": {}
            // },
    //         "2": {
    //             "base_info": {
    //                 "vue_name": "a_1_0_2_13_1",
    //                 "deepcopy_data": {
    //                     "name": "未命名"
    //                 }
    //             },
    //             "dict": {}
    //         },
    //         "3": {
    //             "base_info": {
    //                 "vue_name": "a_1_0_2_13_1",
    //                 "deepcopy_data": {
    //                     "name": "未命名"
    //                 }
    //             },
    //             "dict": {}
    //         },
    //         "4": {
    //             "base_info": {
    //                 "vue_name": "a_1_0_2_13_1",
    //                 "deepcopy_data": {
    //                     "name": "未命名"
    //                 }
    //             },
    //             "dict": {}
    //         }
    //     }
    // }
    /*console.log("接收数据",received_data,_this.data.path);*/
    _this.data.tree_data.set_dict(received_data.data,_this.data.path);
    _this.data.tree_data.check_dct[_this.data.path]=received_data;
    _this.data.获取我的项目目录_flag=true;
}

_this.data.刷新=async function(){
    let count=0;
    _this.data.获取我的项目目录_flag=false;
    _this.data.获取我的项目目录_request({
        body_data:{},
        execute_lst:[
                      {
                        'type':'func',
                        'func':_this.data.获取我的项目目录_recv,
                        'args':['received_data'],
                      },
                    ]
    });
    await time_sleep(20);
    while(1){
        count++;
        await time_sleep(1);
        if(_this.data.获取我的项目目录_flag==true){break}
        if(count>500){Vue.prototype.$notify({type: 'error',message: '获取我的项目目录失败'});break}
    }
}


_this.data.新建项目目录_request=request______({method:'post',url:urls.新建项目目录_url});

_this.data.新建项目目录_recv=function(received_data){
    // {
    //     "type": "okk",
    //     "data": {
    //         "1": {
    //             "base_info": {
    //                 "vue_name": "a_1_0_2_13_1",
    //                 "deepcopy_data": {
    //                     "name": "未命名"
    //                 }
    //             },
    //             "dict": {}
    //         },
    //         "2": {
    //             "base_info": {
    //                 "vue_name": "a_1_0_2_13_1",
    //                 "deepcopy_data": {
    //                     "name": "未命名"
    //                 }
    //             },
    //             "dict": {}
    //         },
    //         "3": {
    //             "base_info": {
    //                 "vue_name": "a_1_0_2_13_1",
    //                 "deepcopy_data": {
    //                     "name": "未命名"
    //                 }
    //             },
    //             "dict": {}
    //         },
    //         "4": {
    //             "base_info": {
    //                 "vue_name": "a_1_0_2_13_1",
    //                 "deepcopy_data": {
    //                     "name": "未命名"
    //                 }
    //             },
    //             "dict": {}
    //         }
    //     }
    // }
    console.log("接收数据",received_data);
    _this.data.tree_data.set_dict(received_data.data,_this.data.path);
    _this.data.新建项目目录_flag=true;
}
_this.data.新建项目目录=async function(name){
    let count=0;
    _this.data.新建项目目录_flag=false;
    _this.data.新建项目目录_request({
        body_data:{name:name},
        execute_lst:[
                      {
                        'type':'func',
                        'func':_this.data.新建项目目录_recv,
                        'args':['received_data'],
                      },
                    ]
    });
    await time_sleep(20);
    while(1){
        count++;
        await time_sleep(1);
        if(_this.data.新建项目目录_flag==true){break}
        if(count>500){Vue.prototype.$notify({type: 'error',message: '新建项目目录失败'});break}
    }
}





_this.data.icon_data={
    2:{

    icon_class:"icon iconfont icon-add_dir1",
    hovertext:"新建项目目录",
    click:async function(){
        _this.$prompt('新建项目目录(名称)', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
          }).then(({ value }) => {
           _this.data.新建项目目录(value);
          }).catch(() => {
            _this.$message({
              type: 'info',
              message: '取消输入'
            });       
          });},
    },
}


}

})

Vue.component2('a_1_0_2_14_1', {  
    template: `
        <div  :class="{ 'a_1_0_2_14_1_lines test': data.true, 'a_1_0_2_14_1_lines_onclick': data.onclick_flag }" @click="handle_click" v-show="show_flag">
        <span :style="'padding-left: '+data._space_+'px;'"></span>
        <span  v-if="data.icon1_show_flag":class="{'icon iconfont':data.true,'icon-right':data.close,'icon-down':data.close==false}"></span>
        
        <span  class="a_1_0_2_14_1_hid_line" style="color:#bcbcbc">{{data.name}}</span>
        <div style="display:inline-block;flex:1;">
        <div style="display:flex;
    justify-content: flex-end;
    display: flex;">
        </div>
        </div>
        </div>
`,
data(){
    return{
        show_flag:true,
        data:{
            onclick_flag:false,
            tree_data:{},//
            icon_data:{},
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            false:false,
            close:true,
            name:"",
            _space_:0,
        }
    }
},
methods:{
    handle_click:async function(event){
        //点击当前 高亮显示
        try{//console.log("高亮",this.data.path);
this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
        // /* console.log("我点击了一次")*/
        try{
            if(!this.data.tree_data.check_dct[this.data.path]){
                await this.data.刷新();
            }
            /*console.log("?2")*/}
        catch{}

        if (this.data.click){
            try{
                this.data.click(event)
            
                // console.log("start click2")
            }
            catch{}
            return 
        }


        if (this.data.click_obj){
            try{
                lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
            
                // console.log("start click3")
            }
            catch{}
            return 
        }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    },
    click1:async function(event,k){
       /* console.log(',,,',this.data.icon_data[k].click)*/
        lhp_run_func(this.data.icon_data[k].click);
        if(!this.data.click_stop){event.stopPropagation();}//阻止父级

    }
},

mounted:function(){
let urls=_this.deepcopy_data.tree_data.url;
// 获取我的他人目录_url:'/get_project_info',
// 获取我的他人目录_url:'/get_project_info2',
// 获取我的项目XXX目录下的所有项目信息_url:'/get_my_project_all',

// 获取他人项目XXX目录下的所有项目信息_url:'/get_other_project_all',
// 获取他人项目列表_url:'/get_other_projects',
// 新建项目目录_url:'/create_project_dir',

// 删除我的项目目录_url:'/del_project_dir',
// 新建我的项目_url:'/create_project',
// 保存项目_url:'/save_project',
// 删除我的项目_url:'/del_project',
// 修改我的项目名称_url:'/change_project',
// 查看项目参与者目录_url:'/project_user',

// 添加别人参与我的项目_url:'/add_other_project',
// 删除别人参与我的项目_url:'/del_other_project',
// 运行流程_url:'/run_flow',
// 结束流程_url:'/stop_flow',
_this.data.获取我的他人目录_flag=false;
_this.data.获取我的他人目录_request=request______({method:'post',url:urls.获取我的他人目录_url});
_this.data.获取我的他人目录_recv=function(received_data){
    console.log("接收到数据:",received_data)
    _this.data.tree_data.set_dict(received_data.data,_this.data.path);
    _this.data.tree_data.check_dct[_this.data.path]=received_data;
    _this.data.获取我的他人目录_flag=true;
}

_this.data.刷新=async function(){
    let count=0;
    _this.data.获取我的他人目录_flag=false;
    _this.data.获取我的他人目录_request({
        body_data:{},
        execute_lst:[
                      {
                        'type':'func',
                        'func':_this.data.获取我的他人目录_recv,
                        'args':['received_data'],
                      },
                    ]
    });
    await time_sleep(20);
    while(1){
        count++;
        await time_sleep(1);
        if(_this.data.获取我的他人目录_flag==true){break}
        if(count>500){Vue.prototype.$notify({type: 'error',message: '获取我的他人目录失败'});break}
    }
}


_this.data.新建项目目录_request=request______({method:'post',url:urls.新建项目目录_url});

_this.data.新建项目目录_recv=function(received_data){
    // {
    //     "type": "okk",
    //     "data": {
    //         "1": {
    //             "base_info": {
    //                 "vue_name": "a_1_0_2_14_1",
    //                 "deepcopy_data": {
    //                     "name": "未命名"
    //                 }
    //             },
    //             "dict": {}
    //         },
    //         "2": {
    //             "base_info": {
    //                 "vue_name": "a_1_0_2_14_1",
    //                 "deepcopy_data": {
    //                     "name": "未命名"
    //                 }
    //             },
    //             "dict": {}
    //         },
    //         "3": {
    //             "base_info": {
    //                 "vue_name": "a_1_0_2_14_1",
    //                 "deepcopy_data": {
    //                     "name": "未命名"
    //                 }
    //             },
    //             "dict": {}
    //         },
    //         "4": {
    //             "base_info": {
    //                 "vue_name": "a_1_0_2_14_1",
    //                 "deepcopy_data": {
    //                     "name": "未命名"
    //                 }
    //             },
    //             "dict": {}
    //         }
    //     }
    // }
    console.log("接收数据",received_data);
    _this.data.tree_data.set_dict(received_data.data,_this.data.path);
    _this.data.新建项目目录_flag=true;
}
_this.data.新建项目目录=async function(name){
    let count=0;
    _this.data.新建项目目录_flag=false;
    _this.data.新建项目目录_request({
        body_data:{name:name},
        execute_lst:[
                      {
                        'type':'func',
                        'func':_this.data.新建项目目录_recv,
                        'args':['received_data'],
                      },
                    ]
    });
    await time_sleep(20);
    while(1){
        count++;
        await time_sleep(1);
        if(_this.data.新建项目目录_flag==true){break}
        if(count>500){Vue.prototype.$notify({type: 'error',message: '新建项目目录失败'});break}
    }
}





_this.data.icon_data={
    2:{

    icon_class:"icon iconfont icon-add_dir1",
    hovertext:"新建项目目录",
    click:async function(){
        _this.$prompt('新建项目目录(名称)', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
          }).then(({ value }) => {
           _this.data.新建项目目录(value);
          }).catch(() => {
            _this.$message({
              type: 'info',
              message: '取消输入'
            });       
          });},
    },
}


}

})

Vue.component2('a_1_0_2_15_1', {  
    template: `
        <div  :class="{ 'a_1_0_2_15_1_lines test': data.true, 'a_1_0_2_15_1_lines_onclick': data.onclick_flag }" @click="handle_click" v-show="show_flag">
        <span :style="'padding-left: '+data._space_+'px;'"></span>
        <span  v-if="data.icon1_show_flag"class="icon iconfont icon-add_dir1"style="margin-right:10px"></span>
        
        <span  class="a_1_0_2_15_1_hid_line" style="color:#bcbcbc">{{data.name}}</span>
        <div style="display:inline-block;flex:1;">
        <div style="display:flex;
    justify-content: flex-end;
    display: flex;">
    
        <div  @click="click1($event,k)" v-for="(v,k) in data.icon_data"
        :key="k">
         <a_1_0_3_0_0 style="display: inline-block;"
         :deepcopy_data="v"></a_1_0_3_0_0>
        </div>
        </div>
        </div>



















        </div>
`,
data(){
    return{
        show_flag:true,
        data:{
            onclick_flag:false,
            tree_data:{},//
            icon_data:{},
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            recv_data:null,
            false:false,
            close:true,
            name:"",
            _space_:0,
        }
    }
},
methods:{
    handle_click:async function(event){
        //点击当前 高亮显示
        try{//console.log("高亮",this.data.path);
this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
        // /* console.log("我点击了一次")*/
        try{
            // if(!this.data.recv_data){
                await this.data.刷新();
            // }
            
        
            /*console.log("?2")*/}
        catch{}

        if (this.data.click){
            try{
                this.data.click(event)
            
                // console.log("start click2")
            }
            catch{}
            return 
        }


        if (this.data.click_obj){
            try{
                lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
            
                // console.log("start click3")
            }
            catch{}
            return 
        }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    },
    click1:async function(event,k){
       /* console.log(',,,',this.data.icon_data[k].click)*/
        lhp_run_func(this.data.icon_data[k].click);
        if(!this.data.click_stop){event.stopPropagation();}//阻止父级

    }
},

mounted:function(){
let urls=_this.deepcopy_data.tree_data.url;
// 获取我的项目XXX目录下的所有项目信息_url:'/get_project_info',
// 获取我的他人目录_url:'/get_project_info2',
// 获取我的项目XXX目录下的所有项目信息_url:'/get_my_project_all',

// 获取他人项目XXX目录下的所有项目信息_url:'/get_other_project_all',
// 获取他人项目列表_url:'/get_other_projects',
// 新建我的项目_url:'/create_project_dir',

// 删除我的项目目录_url:'/del_project_dir',
// 新建我的项目_url:'/create_project',
// 保存项目_url:'/save_project',
// 删除我的项目_url:'/del_project',
// 修改我的项目名称_url:'/change_project',
// 查看项目参与者目录_url:'/project_user',

// 添加别人参与我的项目_url:'/add_other_project',
// 删除别人参与我的项目_url:'/del_other_project',
// 运行流程_url:'/run_flow',
// 结束流程_url:'/stop_flow',
_this.data.获取我的项目XXX目录下的所有项目信息_flag=false;
_this.data.获取我的项目XXX目录下的所有项目信息_request=request______({method:'post',url:urls.获取我的项目XXX目录下的所有项目信息_url});
_this.data.获取我的项目XXX目录下的所有项目信息_recv=function(received_data){
    // {
    //     "type": "okk",
    //     "data": {
    //         "1": {
            //     "base_info": {
            //         "vue_name": "a_1_0_2_15_1",
            //         "deepcopy_data": {
            //             "name": "未命名"
            //         }
            //     },
            //     "dict": {}
            // },
    //         "2": {
    //             "base_info": {
    //                 "vue_name": "a_1_0_2_15_1",
    //                 "deepcopy_data": {
    //                     "name": "未命名"
    //                 }
    //             },
    //             "dict": {}
    //         },
    //         "3": {
    //             "base_info": {
    //                 "vue_name": "a_1_0_2_15_1",
    //                 "deepcopy_data": {
    //                     "name": "未命名"
    //                 }
    //             },
    //             "dict": {}
    //         },
    //         "4": {
    //             "base_info": {
    //                 "vue_name": "a_1_0_2_15_1",
    //                 "deepcopy_data": {
    //                     "name": "未命名"
    //                 }
    //             },
    //             "dict": {}
    //         }
    //     }
    // }
    /*console.log("接收数据",received_data,_this.data.path);*/
    // _this.data.tree_data.set_dict(received_data.data,_this.data.path);
    // this.data.tree_data.check_dct[_this.data.path]=received_data;
    _this.data.recv_data=received_data;
    console.log("接收到数据:",_this.data.recv_data);
    _this.data.获取我的项目XXX目录下的所有项目信息_flag=true;
}

_this.data.刷新=async function(){
    if(!_this.data.dir1_id){
        let path_lst=_this.data.path.split(".");
        _this.data.dir1_id=path_lst[path_lst.length-1];
    }
    let count=0;
    console.log("刷新！")
    _this.data.获取我的项目XXX目录下的所有项目信息_flag=false;
    _this.data.获取我的项目XXX目录下的所有项目信息_request({
        body_data:{"dir1_id":_this.data.dir1_id},
        execute_lst:[
                      {
                        'type':'func',
                        'func':_this.data.获取我的项目XXX目录下的所有项目信息_recv,
                        'args':['received_data'],
                      },
                    ]
    });
    await time_sleep(20);
    while(1){
        count++;
        await time_sleep(1);
        if(_this.data.获取我的项目XXX目录下的所有项目信息_flag==true){
            // console.log("_this.data.tree_data",_this.data.tree_data)
            // window.ssssss=_this.data.tree_data
            _this.data.recv_data.user_id=cookie_read("easyedit_userid");
            _this.data.recv_data['dir1_id']=_this.data.dir1_id;
            lhp_run_func(_this.data.tree_data.设置显示项目,_this.data.recv_data);
            break}
        if(count>500){Vue.prototype.$notify({type: 'error',message: '获取我的项目XXX目录下的所有项目信息失败'});break}
    }
}


_this.data.新建我的项目_request=request______({method:'post',url:urls.新建我的项目_url});

_this.data.新建我的项目_recv=function(received_data){
    // {
    //     "type": "okk",
    //     "data": {
    //         "1": {
    //             "base_info": {
    //                 "vue_name": "a_1_0_2_15_1",
    //                 "deepcopy_data": {
    //                     "name": "未命名"
    //                 }
    //             },
    //             "dict": {}
    //         },
    //         "2": {
    //             "base_info": {
    //                 "vue_name": "a_1_0_2_15_1",
    //                 "deepcopy_data": {
    //                     "name": "未命名"
    //                 }
    //             },
    //             "dict": {}
    //         },
    //         "3": {
    //             "base_info": {
    //                 "vue_name": "a_1_0_2_15_1",
    //                 "deepcopy_data": {
    //                     "name": "未命名"
    //                 }
    //             },
    //             "dict": {}
    //         },
    //         "4": {
    //             "base_info": {
    //                 "vue_name": "a_1_0_2_15_1",
    //                 "deepcopy_data": {
    //                     "name": "未命名"
    //                 }
    //             },
    //             "dict": {}
    //         }
    //     }
    // }
    console.log("接收数据",received_data);
    
    received_data.data.user_id=cookie_read("easyedit_userid");
    received_data.data['dir1_id']=_this.data.dir1_id;
    lhp_run_func(_this.data.tree_data.添加新项目,received_data.data);
    _this.data.新建我的项目_flag=true;
}
_this.data.新建我的项目=async function(name){
    if(!_this.data.dir1_id){
        let path_lst=_this.data.path.split(".");
        _this.data.dir1_id=path_lst[path_lst.length-1];
    }
    let count=0;
    _this.data.新建我的项目_flag=false;
    _this.data.新建我的项目_request({
        body_data:{dir1_id:_this.data.dir1_id,name:name},
        execute_lst:[
                      {
                        'type':'func',
                        'func':_this.data.新建我的项目_recv,
                        'args':['received_data'],
                      },
                    ]
    });
    await time_sleep(20);
    while(1){
        count++;
        await time_sleep(1);
        if(_this.data.新建我的项目_flag==true){break}
        if(count>500){Vue.prototype.$notify({type: 'error',message: '新建我的项目失败'});break}
    }
}

let findKeydeepcopy=function (k,obj, path = []){
    // 遍历对象的所有属性  
    for (let key in obj) {  
        if (obj.hasOwnProperty(key)) {  
            // 更新当前路径  
            let currentPath = [...path, key];  
  
            // 如果当前属性的 key 是 'aaa'，返回路径  
            if (key === k) {  
                return currentPath;  
            }  
  
            // 如果当前属性是对象，递归调用  
            if (typeof obj[key] === 'object' && obj[key] !== null) {  
                let result = findKeydeepcopy(k,obj[key], currentPath);  
                if (result) {  
                    return result;  
                }  
            }  
        }  
    }  
  
    // 如果没有找到 key 为 'aaa' 的对象，返回 null  
    return null;  
}  
let findkey=function(key,data){
let lst=findKeydeepcopy(key,data);
console.log("lst",lst)
let copy_data=data;
for(let i=0;i<lst.length;i++){copy_data=copy_data[lst[i]]}
console.log("copy_data",copy_data)
return copy_data;
}

_this.data.更改目录名称_request=request______({method:'post',url:urls.更改目录名称_url});

_this.data.更改目录名称_recv=function(received_data){
   
    console.log("接收数据",received_data);
    let data=findkey("deepcopy_data",received_data);
    _this.data.tree_data.change_deepcopy_data(_this.data.path,data);
    // _this.data.tree_data.set_dict(received_data,_this.data.path);
    _this.data.更改目录名称_flag=true;
}
_this.data.更改目录名称=async function(name){
    let path_lst=_this.data.path.split(".");
    let dir1_id=path_lst[path_lst.length-1];
    let count=0;
    _this.data.更改目录名称_flag=false;
    _this.data.更改目录名称_request({
        body_data:{name:name,dir1_id:dir1_id},
        execute_lst:[
                      {
                        'type':'func',
                        'func':_this.data.更改目录名称_recv,
                        'args':['received_data'],
                      },
                    ]
    });
    await time_sleep(20);
    while(1){
        count++;
        await time_sleep(1);
        if(_this.data.更改目录名称_flag==true){break}
        if(count>500){Vue.prototype.$notify({type: 'error',message: '更改目录名称失败'});break}
    }
}
_this.data.删除目录_request=request______({method:'post',url:urls.删除目录_url});

_this.data.删除目录_recv=function(received_data){
   
    console.log("接收数据",received_data);
    _this.data.tree_data.del_path(_this.data.path);
    // _this.data.tree_data.set_dict(received_data,_this.data.path);
    _this.data.删除目录_flag=true;
}
_this.data.删除目录=async function(){
    let path_lst=_this.data.path.split(".");
    let dir1_id=path_lst[path_lst.length-1];
    let count=0;
    _this.data.删除目录_flag=false;
    _this.data.删除目录_request({
        body_data:{dir1_id:dir1_id},
        execute_lst:[
                      {
                        'type':'func',
                        'func':_this.data.删除目录_recv,
                        'args':['received_data'],
                      },
                    ]
    });
    await time_sleep(20);
    while(1){
        count++;
        await time_sleep(1);
        if(_this.data.删除目录_flag==true){break}
        if(count>500){Vue.prototype.$notify({type: 'error',message: '删除目录失败'});break}
    }
}



_this.data.icon_data={
    198:{

    icon_class:"icon iconfont icon-shanchu",
    hovertext:"删除目录",
    add_show:false,
    click:async function(){
        
        _this.$confirm('此操作将永久删除, 是否继续?', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            type: 'warning'
          }).then(() => {
        _this.data.删除目录();
          
          }).catch(() => {
            this.$message({
              type: 'info',
              message: '已取消删除'
            });          
          });
        
        },
    },
    199:{

    icon_class:"icon iconfont icon-write",
    hovertext:"修改目录名称",
    add_show:false,
    click:async function(){
        _this.$prompt('修改目录名称', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
          }).then(({ value }) => {
           _this.data.更改目录名称(value);
          }).catch(() => {
            _this.$message({
              type: 'info',
              message: '取消输入'
            });       
          });},
    },
    200:{

    icon_class:"icon iconfont icon-xinjianxiangmu",
    hovertext:"新建项目",
    click:async function(){
        _this.$prompt('新建项目(名称)', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
          }).then(({ value }) => {
           _this.data.新建我的项目(value);
          }).catch(() => {
            _this.$message({
              type: 'info',
              message: '取消输入'
            });       
          });},
    },
}


}

})

Vue.component2('a_1_0_2_16_1', {  
    template: `
        <div  :class="{ 'a_1_0_2_16_1_lines test': data.true, 'a_1_0_2_16_1_lines_onclick': data.onclick_flag }" @click="handle_click" v-show="show_flag">
        <span :style="'padding-left: '+data._space_+'px;'"></span>
        <span  v-if="data.icon1_show_flag"class="icon iconfont icon-yonghu"style="margin-right:10px"></span>
        
        <span class="a_1_0_2_16_1_hid_line"  style="color:#bcbcbc">{{data.name}}</span>
        <div style="display:inline-block;flex:1;">
        <div style="display:flex;
    justify-content: flex-end;
    display: flex;">
    
        </div>
        </div>



















        </div>
`,
data(){
    return{
        show_flag:true,
        data:{
            onclick_flag:false,
            tree_data:{},//
            icon_data:{},
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            recv_data:null,
            false:false,
            close:true,
            name:"",
            _space_:0,
        }
    }
},
methods:{
    handle_click:async function(event){
        //点击当前 高亮显示
        try{//console.log("高亮",this.data.path);
this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
        // /* console.log("我点击了一次")*/
        try{
            if(!this.data.tree_data.check_dct[this.data.path]){
                await this.data.刷新();
            }
            /*console.log("?2")*/}
        catch{}

        if (this.data.click){
            try{
                this.data.click(event)
            
                // console.log("start click2")
            }
            catch{}
            return 
        }


        if (this.data.click_obj){
            try{
                lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
            
                // console.log("start click3")
            }
            catch{}
            return 
        }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    },
    click1:async function(event,k){
       /* console.log(',,,',this.data.icon_data[k].click)*/
        lhp_run_func(this.data.icon_data[k].click);
        if(!this.data.click_stop){event.stopPropagation();}//阻止父级

    }
},

mounted:function(){
let urls=_this.deepcopy_data.tree_data.url;
// 获取他人项目列表_url:'/get_project_info',
// 获取他人项目列表_url:'/get_project_info2',
// 获取我的项目XXX目录下的所有项目信息_url:'/get_my_project_all',

// 获取他人项目XXX目录下的所有项目信息_url:'/get_other_project_all',
// 获取他人项目列表_url:'/get_other_projects',
// 新建项目目录_url:'/create_project_dir',

// 删除我的项目目录_url:'/del_project_dir',
// 新建我的项目_url:'/create_project',
// 保存项目_url:'/save_project',
// 删除我的项目_url:'/del_project',
// 修改我的项目名称_url:'/change_project',
// 查看项目参与者目录_url:'/project_user',

// 添加别人参与我的项目_url:'/add_other_project',
// 删除别人参与我的项目_url:'/del_other_project',
// 运行流程_url:'/run_flow',
// 结束流程_url:'/stop_flow',
_this.data.获取他人项目列表_flag=false;
_this.data.获取他人项目列表_request=request______({method:'post',url:urls.获取他人项目列表_url});
_this.data.获取他人项目列表_recv=function(received_data){
    console.log("接收到数据:",received_data)
    _this.data.tree_data.set_dict(received_data.data,_this.data.path);
    _this.data.tree_data.check_dct[_this.data.path]=received_data;
    _this.data.获取他人项目列表_flag=true;
}

_this.data.刷新=async function(){
    if(!_this.other_id){
        let path_lst=_this.data.path.split(".");
        _this.other_id=path_lst[path_lst.length-1];
    }
    let count=0;
    _this.data.获取他人项目列表_flag=false;
    _this.data.获取他人项目列表_request({
        body_data:{other_id:_this.other_id},
        execute_lst:[
                      {
                        'type':'func',
                        'func':_this.data.获取他人项目列表_recv,
                        'args':['received_data'],
                      },
                    ]
    });
    await time_sleep(20);
    while(1){
        count++;
        await time_sleep(1);
        if(_this.data.获取他人项目列表_flag==true){break}
        if(count>500){Vue.prototype.$notify({type: 'error',message: '获取他人项目列表失败'});break}
    }
}


_this.data.新建项目目录_request=request______({method:'post',url:urls.新建项目目录_url});

_this.data.新建项目目录_recv=function(received_data){
    // {
    //     "type": "okk",
    //     "data": {
    //         "1": {
    //             "base_info": {
    //                 "vue_name": "a_1_0_2_14_1",
    //                 "deepcopy_data": {
    //                     "name": "未命名"
    //                 }
    //             },
    //             "dict": {}
    //         },
    //         "2": {
    //             "base_info": {
    //                 "vue_name": "a_1_0_2_14_1",
    //                 "deepcopy_data": {
    //                     "name": "未命名"
    //                 }
    //             },
    //             "dict": {}
    //         },
    //         "3": {
    //             "base_info": {
    //                 "vue_name": "a_1_0_2_14_1",
    //                 "deepcopy_data": {
    //                     "name": "未命名"
    //                 }
    //             },
    //             "dict": {}
    //         },
    //         "4": {
    //             "base_info": {
    //                 "vue_name": "a_1_0_2_14_1",
    //                 "deepcopy_data": {
    //                     "name": "未命名"
    //                 }
    //             },
    //             "dict": {}
    //         }
    //     }
    // }
    console.log("接收数据",received_data);
    _this.data.tree_data.set_dict(received_data.data,_this.data.path);
    _this.data.新建项目目录_flag=true;
}
_this.data.新建项目目录=async function(name){
    let count=0;
    _this.data.新建项目目录_flag=false;
    _this.data.新建项目目录_request({
        body_data:{name:name},
        execute_lst:[
                      {
                        'type':'func',
                        'func':_this.data.新建项目目录_recv,
                        'args':['received_data'],
                      },
                    ]
    });
    await time_sleep(20);
    while(1){
        count++;
        await time_sleep(1);
        if(_this.data.新建项目目录_flag==true){break}
        if(count>500){Vue.prototype.$notify({type: 'error',message: '新建项目目录失败'});break}
    }
}





_this.data.icon_data={
    2:{

    icon_class:"icon iconfont icon-add_dir1",
    hovertext:"新建项目目录",
    click:async function(){
        _this.$prompt('新建项目目录(名称)', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
          }).then(({ value }) => {
           _this.data.新建项目目录(value);
          }).catch(() => {
            _this.$message({
              type: 'info',
              message: '取消输入'
            });       
          });},
    },
}


}

})

Vue.component2('a_1_0_2_17_1', {  
    template: `
        <div  :class="{ 'a_1_0_2_17_1_lines test': data.true, 'a_1_0_2_17_1_lines_onclick': data.onclick_flag }" @click="handle_click" v-show="show_flag">
        <span :style="'padding-left: '+data._space_+'px;'"></span>
        <span  v-if="data.icon1_show_flag"class="icon iconfont icon-add_dir1"style="margin-right:10px"></span>
        
        <span  class="a_1_0_2_17_1_hid_line" style="color:#bcbcbc">{{data.name}}</span>
        <div style="display:inline-block;flex:1;">
        <div style="display:flex;
    justify-content: flex-end;
    display: flex;">
    
        <div  @click="click1($event,k)" v-for="(v,k) in data.icon_data"
        :key="k">
         <a_1_0_3_0_0 style="display: inline-block;"
         :deepcopy_data="v"></a_1_0_3_0_0>
        </div>
        </div>
        </div>



















        </div>
`,
data(){
    return{
        show_flag:true,
        data:{
            onclick_flag:false,
            tree_data:{},//
            icon_data:{},
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            recv_data:null,
            false:false,
            close:true,
            name:"",
            _space_:0,
        }
    }
},
methods:{
    handle_click:async function(event){
        //点击当前 高亮显示
        try{//console.log("高亮",this.data.path);
this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
        // /* console.log("我点击了一次")*/
        try{
            // if(!this.data.recv_data){
                await this.data.刷新();
            // }
            
        
            /*console.log("?2")*/}
        catch{}

        if (this.data.click){
            try{
                this.data.click(event)
            
                // console.log("start click2")
            }
            catch{}
            return 
        }


        if (this.data.click_obj){
            try{
                lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
            
                // console.log("start click3")
            }
            catch{}
            return 
        }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    },
    click1:async function(event,k){
       /* console.log(',,,',this.data.icon_data[k].click)*/
        lhp_run_func(this.data.icon_data[k].click);
        if(!this.data.click_stop){event.stopPropagation();}//阻止父级

    }
},

mounted:function(){
let urls=_this.deepcopy_data.tree_data.url;
// 获取他人项目XXX目录下的所有项目信息_url:'/get_project_info',
// 获取我的他人目录_url:'/get_project_info2',
// 获取他人项目XXX目录下的所有项目信息_url:'/get_my_project_all',

// 获取他人项目XXX目录下的所有项目信息_url:'/get_other_project_all',
// 获取他人项目列表_url:'/get_other_projects',
// 新建我的项目_url:'/create_project_dir',

// 删除我的项目目录_url:'/del_project_dir',
// 新建我的项目_url:'/create_project',
// 保存项目_url:'/save_project',
// 删除我的项目_url:'/del_project',
// 修改我的项目名称_url:'/change_project',
// 查看项目参与者目录_url:'/project_user',

// 添加别人参与我的项目_url:'/add_other_project',
// 删除别人参与我的项目_url:'/del_other_project',
// 运行流程_url:'/run_flow',
// 结束流程_url:'/stop_flow',
_this.data.获取他人项目XXX目录下的所有项目信息_flag=false;
_this.data.获取他人项目XXX目录下的所有项目信息_request=request______({method:'post',url:urls.获取他人项目XXX目录下的所有项目信息_url});
_this.data.获取他人项目XXX目录下的所有项目信息_recv=function(received_data){
    _this.data.recv_data=received_data;
    console.log("接收到数据:",_this.data.recv_data);
    _this.data.获取他人项目XXX目录下的所有项目信息_flag=true;
}

_this.data.刷新=async function(){
    if(!_this.data.dir1_id){
        let path_lst=_this.data.path.split(".");
        _this.data.other_id=path_lst[path_lst.length-2];
        _this.data.dir1_id=path_lst[path_lst.length-1];
    }
    let count=0;
    _this.data.获取他人项目XXX目录下的所有项目信息_flag=false;
    _this.data.获取他人项目XXX目录下的所有项目信息_request({
        body_data:{"dir1_id":_this.data.dir1_id,other_id:_this.data.other_id},
        execute_lst:[
                      {
                        'type':'func',
                        'func':_this.data.获取他人项目XXX目录下的所有项目信息_recv,
                        'args':['received_data'],
                      },
                    ]
    });
    await time_sleep(20);
    while(1){
        count++;
        await time_sleep(1);
        if(_this.data.获取他人项目XXX目录下的所有项目信息_flag==true){
            // console.log("_this.data.tree_data",_this.data.tree_data)
            // window.ssssss=_this.data.tree_data
            _this.data.recv_data.user_id=_this.data.other_id;
            _this.data.recv_data['dir1_id']=_this.data.dir1_id;
            lhp_run_func(_this.data.tree_data.设置显示项目,_this.data.recv_data);
            break}
        if(count>500){Vue.prototype.$notify({type: 'error',message: '获取他人项目XXX目录下的所有项目信息失败'});break}
    }
}

  


}

})

Vue.component2('a_1_0_2_18_1', {  
    template: `
        <div  :class="{ 'a_1_0_2_18_1_lines test': data.true, 'a_1_0_2_18_1_lines_onclick': data.onclick_flag }" @click="handle_click" v-show="show_flag">
        <span :style="'padding-left: '+data._space_+'px;'"></span>
        
        <span  v-if="data.icon1_show_flag":class="{'icon iconfont':data.true,'icon-right':data.close,'icon-down':data.close==false}"></span>
        
        <span class="a_1_0_2_18_1_hid_line"  style="color:#bcbcbc">{{data.name}}</span>
        <div style="display:inline-block;flex:1;">
        <div style="display:flex;
    justify-content: flex-end;
    display: flex;">
    
        <div  @click="click1($event,k)" v-for="(v,k) in data.icon_data"
        :key="k">
         <a_1_0_3_0_0 style="display: inline-block;"
         :deepcopy_data="v"></a_1_0_3_0_0>
        </div>
        </div>
        </div>



















        </div>
`,
data(){
    return{
        show_flag:true,
        data:{
            onclick_flag:false,
            tree_data:{},//
            icon_data:{},
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            recv_data:null,
            false:false,
            close:true,
            name:"",
            _space_:0,
        }
    }
},
methods:{
    handle_click:async function(event){
        //点击当前 高亮显示
        try{//console.log("高亮",this.data.path);
this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
        // /* console.log("我点击了一次")*/
        try{
            // if(!this.data.recv_data){
                // await this.data.刷新();
            // }
            
        
            /*console.log("?2")*/}
        catch{}

        if (this.data.click){
            try{
                this.data.click(event)
            
                // console.log("start click2")
            }
            catch{}
            return 
        }


        if (this.data.click_obj){
            try{
                lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
            
                // console.log("start click3")
            }
            catch{}
            return 
        }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    },
    click1:async function(event,k){
       /* console.log(',,,',this.data.icon_data[k].click)*/
        lhp_run_func(this.data.icon_data[k].click);
        if(!this.data.click_stop){event.stopPropagation();}//阻止父级

    }
},

mounted:function(){
    let urls=_this.deepcopy_data.tree_data.url;
_this.data.粘贴后端目录1_request=request______({method:'post',url:urls.粘贴后端目录1_url});
//通过路由获取当前项目  所在的 用户id  项目目录  项目id
let getQueryParams=function () {  
    const queryParams = {};  
    const urlParams = new URLSearchParams(window.location.search);  
    for (const [key, value] of urlParams.entries()) {  
        queryParams[key] = value;  
    }  
    return queryParams;  
}  

let params=getQueryParams();
_this.data.icon_data={
    198:{

    icon_class:"icon iconfont icon-zhantie",
    hovertext:"粘贴目录1",
    add_show:false,
    click:async function(){
        try {
            let text = await navigator.clipboard.readText();
            if(text.split("_").length!=3){
                _this.$message({
                    type: 'error',
                    message: '数据格式不符合a_xx_xx'
                  });      
                return
            }
            console.log('粘贴板中的文本: ' + text);
            let par=JSON.parse(JSON.stringify(params));
            par.text=text;
            _this.data.粘贴后端目录1_request({
                body_data:par,
            });
          } catch (err) {
            
            _this.$message({
                type: 'error',
                message: '无法读取粘贴板内容:'  + err.message
              });      
          }
        },
    },
    199:{

    icon_class:"icon iconfont icon-add_dir1",
    hovertext:"新建目录1",
    click:async function(){
        _this.$prompt('修改目录名称', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
          }).then(({ value }) => {try{ 
          let update_val={
          "type":"change_data",
          "data_type":"set_list",
          "update_params":[
          
                      {
                      "name":'@add_index',
                      "path":`flow_chat_config.dict.2.base_info.index`,
                      "use":"++s"
                      }
          ],
          "postput":[
          {
              'path':`flow_chat_config.dict.2.dict.@add_index`,
              'data':{"base_info": {
                "vue_name":"a_1_0_2_19_1",
                "index": 0,
                "deepcopy_data": {
                    "name":value
                }
            },
            "dict": {
            }}
          },
          {
              'path':`flow_chat_config.dict.2.base_info`,
              'data':{"index":"@add_index"}
          },
          ],
          }
        _this.data.tree_data.全局配置对象.更新(update_val);

        }catch (err){console.log("err",err);
}
          }).catch(() => {
            _this.$message({
              type: 'info',
              message: '取消输入'
            });       
          });},
    },
}


}

})

Vue.component2('a_1_0_2_19_1', {  
    template: `
        <div  :class="{ 'a_1_0_2_19_1_lines test': data.true, 'a_1_0_2_19_1_lines_onclick': data.onclick_flag }" @click="handle_click" v-show="show_flag">
        <span :style="'padding-left: '+data._space_+'px;'"></span>
        <span  v-if="data.icon1_show_flag":class="{'icon iconfont':data.true,'icon-right':data.close,'icon-down':data.close==false}"></span>
        
        <span class="a_1_0_2_19_1_hid_line"  style="color:#bcbcbc">{{data.name}}</span>
        <div style="display:inline-block;flex:1;">
        <div style="display:flex;
    justify-content: flex-end;
    display: flex;">
    
        <div  @click="click1($event,k)" v-for="(v,k) in data.icon_data"
        :key="k">
         <a_1_0_3_0_0 style="display: inline-block;"
         :deepcopy_data="v"></a_1_0_3_0_0>
        </div>
        </div>
        </div>



















        </div>
`,
data(){
    return{
        show_flag:true,
        data:{
            onclick_flag:false,
            tree_data:{},//
            icon_data:{},
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            recv_data:null,
            false:false,
            close:true,
            name:"",
            _space_:0,
        }
    }
},
methods:{
    handle_click:async function(event){
        //点击当前 高亮显示
        try{//console.log("高亮",this.data.path);
this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
        // /* console.log("我点击了一次")*/
        try{
            // if(!this.data.recv_data){
                // await this.data.刷新();
            // }
            
        
            /*console.log("?2")*/}
        catch{}

        if (this.data.click){
            try{
                this.data.click(event)
            
                // console.log("start click2")
            }
            catch{}
            return 
        }


        if (this.data.click_obj){
            try{
                lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
            
                // console.log("start click3")
            }
            catch{}
            return 
        }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    },
    click1:async function(event,k){
       /* console.log(',,,',this.data.icon_data[k].click)*/
        lhp_run_func(this.data.icon_data[k].click);
        if(!this.data.click_stop){event.stopPropagation();}//阻止父级

    }
},

mounted:function(){
    let urls=_this.deepcopy_data.tree_data.url;
_this.data.粘贴后端目录2_request=request______({method:'post',url:urls.粘贴后端目录2_url});
//通过路由获取当前项目  所在的 用户id  项目目录  项目id
let getQueryParams=function () {  
    const queryParams = {};  
    const urlParams = new URLSearchParams(window.location.search);  
    for (const [key, value] of urlParams.entries()) {  
        queryParams[key] = value;  
    }  
    return queryParams;  
}  

let params=getQueryParams();

_this.data.icon_data={
    198:{

    icon_class:"icon iconfont icon-zhantie",
    hovertext:"粘贴目录2",
    add_show:false,
    click:async function(){
        

        try {
            let text = await navigator.clipboard.readText();
            if(text.split("_").length!=4){
                _this.$message({
                    type: 'error',
                    message: '数据格式不符合a_xx_xx_xx'
                  });      
                return
            }
            console.log('粘贴板中的文本: ' + text);
            let par=JSON.parse(JSON.stringify(params));
            par.text=text;
            par.key=_this.data.path;
            _this.data.粘贴后端目录2_request({
                body_data:par,
            });
          } catch (err) {
            
            _this.$message({
                type: 'error',
                message: '无法读取粘贴板内容:'  + err.message
              });      
          }
        
        },
    },
    199:{

    icon_class:"icon iconfont icon-add_dir2",
    hovertext:"新建目录2",
    click:async function(){
        _this.$prompt('新建目录2名称', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
          }).then(({ value }) => {
            try{ if(!_this.data.dir1_id){
                let path_lst=_this.data.path.split(".");
                console.log("###############path_lst",_this.data.path,path_lst,path_lst[1])
                _this.data.dir1_id=path_lst[1];
            }
              let update_val={
              "type":"change_data",
              "data_type":"set_list",
              "update_params":[
              
                          {
                          "name":'@add_index',
                          "path":`flow_chat_config.dict.2.dict.${_this.data.dir1_id}.base_info.index`,
                          "use":"++s"
                          }
              ],
              "postput":[
              {
                  'path':`flow_chat_config.dict.2.dict.${_this.data.dir1_id}.dict.@add_index`,
                  'data':{"base_info": {
                    "vue_name":"a_1_0_2_20_1",
                    "index": 0,
                    "deepcopy_data": {
                        "name":value
                    }
                },
                "dict": {
                }}
              },
              {
                  'path':`flow_chat_config.dict.2.dict.${_this.data.dir1_id}.base_info`,
                  'data':{"index":"@add_index"}
              },
              ],
              }
            _this.data.tree_data.全局配置对象.更新(update_val);

            }catch (err){console.log("err",err);
}
           
          }
        
        
        
        ).catch(() => {
            _this.$message({
              type: 'info',
              message: '取消输入'
            });       
          });},
    },
}


}

})

Vue.component2('a_1_0_2_2_0', {  
    template: `
        <div  :class="{ 'a_1_0_2_2_0_lines test': data.true, 'a_1_0_2_2_0_lines_onclick': data.onclick_flag }" @click="handle_click" v-show="show_flag">
        <span :style="'padding-left: '+data._space_+'px;'"></span>
        <span  v-if="data.icon1_show_flag":class="{'icon iconfont':data.true,'icon-right':data.close,'icon-down':data.close==false}"></span>
        
        <span  class="a_1_0_2_2_1_hid_line" style="color:#bcbcbc">{{data.name}}</span>
        <div style="display:inline-block;flex:1;">
        <div style="display:flex;
    justify-content: flex-end;
    display: flex;">
    
        <div  @click="click1($event,k)" v-for="(v,k) in data.icon_data"
        :key="k">
         <a_1_0_3_0_0 style="display: inline-block;"
         :deepcopy_data="v"></a_1_0_3_0_0>
        </div>
        </div>
        </div>
        </div>
`,
data(){
    return{
        show_flag:true,
        data:{
            onclick_flag:false,
            tree_data:{},//
            icon_data:{},
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            false:false,
            close:true,
            name:"",
            _space_:0,
        }
    }
},
methods:{

    handle_click:async function(event){
        //点击当前 高亮显示
        try{//console.log("高亮",this.data.path);
this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
        /* console.log("我点击了一次")*/
        try{
            /* console.log("?")*/
            if(!this.data.tree_data.check_dct[this.data.path]){
                await this.data.刷新目录2();
            }
            /*console.log("?2")*/}
        catch{}

        if (this.data.click){
            try{
                this.data.click(event)
            
                // console.log("start click2")
            }
            catch{}
            return 
        }


        if (this.data.click_obj){
            try{
                lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
            
                // console.log("start click3")
            }
            catch{}
            return 
        }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    },
    click1:async function(event,k){
       /* console.log(',,,',this.data.icon_data[k].click)*/
        lhp_run_func(this.data.icon_data[k].click);
        if(!this.data.click_stop){event.stopPropagation();}//阻止父级

    }
},

mounted:function(){
    /*console.log("210的deepcopydata",_this.deepcopy_data)*/
let urls=_this.deepcopy_data.tree_data.url;
let check_dct=_this.deepcopy_data.tree_data.check_dct;
//   获取用户的前端组件库目录2列表_url:'/get_ui_dir1',
//   获取用户的前端组件库目录2列表_url:'/get_ui_dir2',
//   获取用户的前端组件库组件列表_url:'/get_ui_temp',
//   获取用户的前端组件库组件版本列表_url:'/get_ui_version',
//   添加前端目录2_url:'/add_ui_dir1',
//   添加前端目录2_url:'/add_ui_dir2',
//   添加前端组件_url:'/add_ui_temp',
//   添加前端组件版本_url:'/add_ui_version',
//   更新前端组件版本_url:'/update_ui_version',
//   修改前端目录1属性_url:'/change_ui_dir1'
//   修改前端目录2属性_url:'/change_ui_dir2'
//   修改前端目录1属性_url:'/change_ui_temp'



//   获取用户的后端组件库目录2列表_url:'/get_flow_dir1',
//   获取用户的后端组件库目录2列表_url:'/get_flow_dir2',
//   获取用户的后端组件库组件列表_url:'/get_flow_temp',
//   获取用户的后端组件库组件版本列表_url:'/get_ui_version',
//   添加后端目录2_url:'/add_flow_dir1',
//   添加后端目录2_url:'/add_flow_dir2',
//   添加后端组件_url:'/add_flow_temp',
//   添加后端组件版本_url:'/add_flow_version',
//   更新后端组件版本_url:'/update_flow_version',
_this.data.获取用户的前端组件库目录2列表_flag=false;
_this.data.获取用户的前端组件库目录2列表_request=request______({method:'post',url:urls.获取用户的前端组件库目录2列表_url});
_this.data.获取用户的前端组件库目录2列表_recv=function(received_data){
    /*console.log("接收数据",received_data,_this.data.path);*/
    _this.data.tree_data.set_dict(received_data.data,_this.data.path);
    check_dct[_this.data.path]=received_data;
    _this.data.获取用户的前端组件库目录2列表_flag=true;
}
_this.data.刷新目录2=async function(){
    if(!_this.data.dir1_id){
        let path_l=_this.data.path.split(".");
        _this.data.dir1_id=path_l[path_l.length-1];
    }
    let count=0;
    _this.data.获取用户的前端组件库目录2列表_flag=false;
    _this.data.获取用户的前端组件库目录2列表_request({
        body_data:{dir1_id:_this.data.dir1_id},
        execute_lst:[
                      {
                        'type':'func',
                        'func':_this.data.获取用户的前端组件库目录2列表_recv,
                        'args':['received_data'],
                      },
                    ]
    });
    await time_sleep(20);
    while(1){
        count++;
        await time_sleep(1);
        if(_this.data.获取用户的前端组件库目录2列表_flag==true){break}
        if(count>500){Vue.prototype.$notify({type: 'error',message: '获取前端目录2列表失败'});break}
    }
}



_this.data.添加前端目录2_request=request______({method:'post',url:urls.添加前端目录2_url});

_this.data.添加前端目录2_recv=function(received_data){
    console.log("接收数据",received_data);
    _this.data.tree_data.set_dict(received_data,_this.data.path);
    _this.data.添加前端目录2_flag=true;
}
_this.data.添加前端目录2=async function(name){
    if(!_this.data.dir1_id){
        let path_l=_this.data.path.split(".");
        _this.data.dir1_id=path_l[path_l.length-1];
    }
    let count=0;
    _this.data.添加前端目录2_flag=false;
    _this.data.添加前端目录2_request({
        body_data:{name:name,dir1_id:_this.data.dir1_id},
        execute_lst:[
                      {
                        'type':'func',
                        'func':_this.data.添加前端目录2_recv,
                        'args':['received_data'],
                      },
                    ]
    });
    await time_sleep(20);
    while(1){
        count++;
        await time_sleep(1);
        if(_this.data.添加前端目录2_flag==true){break}
        if(count>500){Vue.prototype.$notify({type: 'error',message: '添加前端目录2失败'});break}
    }
}




_this.data.修改前端目录1属性_request=request______({method:'post',url:urls.修改前端目录1属性_url});

findKeydeepcopy=function (obj, path = []){
    // 遍历对象的所有属性  
    for (let key in obj) {  
        if (obj.hasOwnProperty(key)) {  
            // 更新当前路径  
            let currentPath = [...path, key];  
  
            // 如果当前属性的 key 是 'aaa'，返回路径  
            if (key === 'deepcopy_data') {  
                return currentPath;  
            }  
  
            // 如果当前属性是对象，递归调用  
            if (typeof obj[key] === 'object' && obj[key] !== null) {  
                let result = findKeydeepcopy(obj[key], currentPath);  
                if (result) {  
                    return result;  
                }  
            }  
        }  
    }  
  
    // 如果没有找到 key 为 'aaa' 的对象，返回 null  
    return null;  
}  
_this.data.修改前端目录1属性_recv=function(received_data){
    console.log("接收数据",received_data);
    _this.data.修改前端目录1属性_flag=true;
    let lst=findKeydeepcopy(received_data);
    let copy_data=received_data;
    for(let i=0;i<lst.length;i++){copy_data=copy_data[lst[i]]}
    _this.data.tree_data.change_deepcopy_data(_this.data.path,copy_data);
}
_this.data.修改前端目录1属性=async function(name){
    if(!_this.data.dir1_id){
        let path_l=_this.data.path.split(".");
        _this.data.dir1_id=path_l[path_l.length-1];
    }
    let count=0;
    _this.data.修改前端目录1属性_flag=false;
    _this.data.修改前端目录1属性_request({
        body_data:{name:name,dir1_id:_this.data.dir1_id},
        execute_lst:[
                      {
                        'type':'func',
                        'func':_this.data.修改前端目录1属性_recv,
                        'args':['received_data'],
                      },
                    ]
    });
    await time_sleep(20);
    while(1){
        count++;
        await time_sleep(1);
        if(_this.data.修改前端目录1属性_flag==true){break}
        if(count>500){Vue.prototype.$notify({type: 'error',message: '修改前端目录1属性失败'});break}
    }
}


_this.data.icon_data={
    297:{
      icon_class:"icon iconfont icon-fuzhi",
      hovertext:"复制目录1id",
      add_show:false,
      click:async function(){
        if(!_this.data.dir1_id){
            let path_l=_this.data.path.split(".");
            _this.data.dir1_id=path_l[path_l.length-1];
        }
      let copy_data=`a_${cookie_read("easyedit_userid")}_${_this.data.dir1_id}`
        copy_text(copy_data); 
        Vue.prototype.$notify({type: 'success',message: '已拷贝:'+copy_data})
  
    },
  },
    330:{
        icon_class:"icon iconfont icon-write",
        hovertext:"修改前端目录1属性",
        add_show:false,
        click:async function(){
            _this.$prompt('修改前端目录1(名称)', '提示', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
              }).then(({ value }) => {
               _this.data.修改前端目录1属性(value);
              }).catch(() => {
                _this.$message({
                  type: 'info',
                  message: '取消输入'
                });       
              });},
        },
    331:{
        icon_class:"icon iconfont icon-refresh",
        hovertext:"刷新目录2列表",
        add_show:false,
        click:async function(){
            /*console.log("开始刷新目录");*/
            _this.data.刷新目录2();
        }
        },
    332:{

    icon_class:"icon iconfont icon-add_dir2",
    hovertext:"添加前端目录2",
    click:async function(){
        _this.$prompt('添加前端目录2(名称)', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
          }).then(({ value }) => {
           _this.data.添加前端目录2(value);
          }).catch(() => {
            _this.$message({
              type: 'info',
              message: '取消输入'
            });       
          });},
    },
}


}

})


Vue.component2('a_1_0_2_20_1', {  
    template: `
        <div  :class="{ 'a_1_0_2_20_1_lines test': data.true, 'a_1_0_2_20_1_lines_onclick': data.onclick_flag }" @click="handle_click" v-show="show_flag">
        <span :style="'padding-left: '+data._space_+'px;'"></span>
        <span  v-if="data.icon1_show_flag":class="{'icon iconfont':data.true,'icon-right':data.close,'icon-down':data.close==false}"></span>
        
        <span class="a_1_0_2_20_1_hid_line"  style="color:#bcbcbc">{{data.name}}</span>
        <div style="display:inline-block;flex:1;">
        <div style="display:flex;
    justify-content: flex-end;
    display: flex;">
    
        <div  @click="click1($event,k)" v-for="(v,k) in data.icon_data"
        :key="k">
         <a_1_0_3_0_0 style="display: inline-block;"
         :deepcopy_data="v"></a_1_0_3_0_0>
        </div>
        </div>
        </div>



















        </div>
`,
data(){
    return{
        show_flag:true,
        data:{
            onclick_flag:false,
            tree_data:{},//
            icon_data:{},
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            recv_data:null,
            false:false,
            close:true,
            name:"",
            _space_:0,
        }
    }
},
methods:{
    handle_click:async function(event){
        //点击当前 高亮显示
        try{//console.log("高亮",this.data.path);
this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
        // /* console.log("我点击了一次")*/
        try{
            // if(!this.data.recv_data){
                // await this.data.刷新();
            // }
            
        
            /*console.log("?2")*/}
        catch{}

        if (this.data.click){
            try{
                this.data.click(event)
            
                // console.log("start click2")
            }
            catch{}
            return 
        }


        if (this.data.click_obj){
            try{
                lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
            
                // console.log("start click3")
            }
            catch{}
            return 
        }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    },
    click1:async function(event,k){
       /* console.log(',,,',this.data.icon_data[k].click)*/
        lhp_run_func(this.data.icon_data[k].click);
        if(!this.data.click_stop){event.stopPropagation();}//阻止父级

    }
},

mounted:function(){

    let urls=_this.deepcopy_data.tree_data.url;
_this.data.粘贴后端组件_request=request______({method:'post',url:urls.粘贴后端组件_url});
//通过路由获取当前项目  所在的 用户id  项目目录  项目id
let getQueryParams=function () {  
    const queryParams = {};  
    const urlParams = new URLSearchParams(window.location.search);  
    for (const [key, value] of urlParams.entries()) {  
        queryParams[key] = value;  
    }  
    return queryParams;  
}  

let params=getQueryParams();
_this.data.icon_data={
    198:{

    icon_class:"icon iconfont icon-zhantie",
    hovertext:"粘贴组件",
    add_show:false,
    click:async function(){
 
        try {
            let text = await navigator.clipboard.readText();
            if(text.split("_").length!=6){
                _this.$message({
                    type: 'error',
                    message: '数据格式不符合a_xx_xx_xx_xx_xx'
                  });      
                return
            }
            console.log('粘贴板中的文本: ' + text);
            let par=JSON.parse(JSON.stringify(params));
            par.text=text;
            par.key=_this.data.path;
            _this.data.粘贴后端组件_request({
                body_data:par,
            });
          } catch (err) {
            
            _this.$message({
                type: 'error',
                message: '无法读取粘贴板内容:'  + err.message
              });      
          }
        },
    },
}


}

})

Vue.component2('a_1_0_2_21_1_move_line', {  
    template: `
        <div style="position:absolute" id="a_1_0_2_21_1_move_line" class="a_1_0_2_21_1_lines"
        
        >
    <div style="display: flex;
    align-items: center;
    border: 1px solid #b9b9b9;
    border-radius: 4px;
    padding-left: 4px;
    padding-right: 4px;">
        <span  v-if="data.icon1_show_flag" class="icon iconfont icon-add_temp"></span>
        
        <span style="color:#bcbcbc">{{data.name}}</span>
        </div>
        </div>
`,
data(){
    return{
        show_flag:true,
        data:{
            name:"333",
            _space_:0,
        }
    }
}})


Vue.component2('a_1_0_2_21_1', {  
    template: `
        <div ref="dom" :class="{ 'a_1_0_2_21_1_lines test': data.true, 'a_1_0_2_21_1_lines_onclick': data.onclick_flag }" @click="handle_click" v-show="show_flag"
        
        
    @mousemove="mousemove_"  
    @mouseup="mouseup_" 
    @mouseleave="mouseleave_" 
    @mouseenter="mouseenter_"
    @mousedown="mousedown_"
        >
        <span :style="'padding-left: '+data._space_+'px;'"></span>
    <div style="display: flex;
    align-items: center;
    border: 1px solid #b9b9b9;
    border-radius: 4px;
    padding-left: 4px;
    padding-right: 4px;">
        <span  v-if="data.icon1_show_flag" class="icon iconfont icon-add_temp"></span>
        
        <span  class="a_1_0_2_21_1_hid_line" style="color:#bcbcbc">{{data.name}}</span>
        </div>

        <div style="display:inline-block;flex:1;height:100%">
        <div style="display:flex;
    justify-content: flex-end;
    display: flex;height:100%">
    
        <div  @click="click1($event,k)" v-for="(v,k) in data.icon_data"
        :key="k">
         <a_1_0_3_0_0 style="display: inline-block;"
         :deepcopy_data="v"></a_1_0_3_0_0>
        </div>
        <div   style="
    color: rgba(231, 231, 231, 0.6);display: inline-block; border: 1px solid rgb(185, 185, 185);
    width: 20px;
    height: 100%;" 
@click="change_version">
        <div style="margin-top:3px">{{data.info.version}}</div>
        </div>
        </div>
        </div>



















        </div>
`,
data(){
    return{
        show_flag:true,
        data:{
            info:{"version":"0"},
            onclick_flag:false,
            tree_data:{},//
            icon_data:{},
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            recv_data:null,
            false:false,
            close:true,
            name:"",
            _space_:0,
        }
    }
},
methods:{
    mousemove_:function(event){

    },
    mouseup_:function(event){

    },
   mouseleave_:function(event){

   },
    mouseenter_:function(event){

    },
    change_version:function(){
        this.$prompt('输入版本号', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
          }).then(({ value }) => {
            try{

                let par=JSON.parse(JSON.stringify(this.data.params));
                par.value=value;
                par.key=this.data.info.temp_id+'_'+this.data.info.version;
                par.path=this.data.path;
                this.data.修改后端组件版本_request({
                    body_data:par,
                });
            }catch (err){
                console.log("err"+err)
            }
          }).catch(() => {
            this.$message({
              type: 'info',
              message: '取消输入'
            });       
          });
    },
    绘制跟随鼠标移动的dom:function(event){
        let xy=this.get_x_y(event,"dom");
        if(!window.a_1_0_2_21_1_move_obj){
            // 创建跟随鼠标的元素  
            let dom = document.createElement('a_1_0_2_21_1_move_line'); 
            dom.setAttribute('ref', 'ref_obj');
            document.body.appendChild(dom);  
            let vue_dct={'el':dom,data:{true:true,false:false,null:null,deepcopy_data:this.data}}
            window.a_1_0_2_21_1_move_obj=new Vue(vue_dct);
        }
        this.鼠标移动时移动dom(xy.x,xy.y);
        a_1_0_2_21_1_move_obj.$refs['ref_obj'].data.name=this.data.name;
        a_1_0_2_21_1_move_obj.$el.style.visibility='visible';
    },
    鼠标移动时移动dom:function(x,y){
        // 获取 ID 为 "xxx" 的 DOM 元素  
        var element = document.getElementById('a_1_0_2_21_1_move_line');  
        
        // 检查元素是否存在  
        if (element) {  
        // 设置 left 和 top 样式属性  
        element.style.left =(Number(x)-30)+'px'; 
        element.style.top =(Number(y)-30)+'px';  
        } else {  
        console.error('Element with ID "a_1_0_2_21_1_move_line" not found!');  
        }
    },
    鼠标移动时移动dom2:function(event){
        // 获取 ID 为 "xxx" 的 DOM 元素  
        var element = document.getElementById('a_1_0_2_21_1_move_line');  
        
        // 检查元素是否存在  
        if (element) {  
        // 设置 left 和 top 样式属性  
        element.style.left =(Number(event.clientX)-30)+'px'; 
        element.style.top =(Number(event.clientY)-30)+'px';  
        } else {  
        console.error('Element with ID "a_1_0_2_21_1_move_line" not found!');  
        }
    },
    鼠标up时回收dom:function(){
        let _this=this;
        _this.data.全局鼠标操作对象1.unset_move({"key":"拖拽后端组件",
            key2:"鼠标移动时移动dom2",});
        _this.data.全局鼠标操作对象1.unset_up({"key":"拖拽后端组件",
            key2:"鼠标up时回收dom",});
        
        a_1_0_2_21_1_move_obj.$el.style.visibility='hidden';
    },
    mousedown_:function(event){
        let _this=this;
        console.log("_this.data.全局鼠标操作对象1",_this.data,_this.data.全局鼠标操作对象1)
        
        _this.data.全局鼠标操作对象1.set_move({
            key:"拖拽后端组件",
            key2:"鼠标移动时移动dom2",
            func:_this.鼠标移动时移动dom2,
        });
        _this.data.全局鼠标操作对象1.set_up({
            key:"拖拽后端组件",
            key2:"鼠标up时回收dom",
            func:_this.鼠标up时回收dom,
        });
        _this.data.全局鼠标操作对象1.set_data({
            key:"拖拽后端组件",
            data:_this.data.info
        });
        this.绘制跟随鼠标移动的dom(event);
    },





    handle_click:async function(event){
        //点击当前 高亮显示
        try{//console.log("高亮",this.data.path);
this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
        // /* console.log("我点击了一次")*/
        try{
            // if(!this.data.recv_data){
                // await this.data.刷新();
            // }
            
        
            /*console.log("?2")*/}
        catch{}

        if (this.data.click){
            try{
                this.data.click(event)
            
                // console.log("start click2")
            }
            catch{}
            return 
        }


        if (this.data.click_obj){
            try{
                lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
            
                // console.log("start click3")
            }
            catch{}
            return 
        }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    },
    click1:async function(event,k){
       /* console.log(',,,',this.data.icon_data[k].click)*/
        lhp_run_func(this.data.icon_data[k].click);
        if(!this.data.click_stop){event.stopPropagation();}//阻止父级

    }
},

mounted:function(){
_this.data.全局鼠标操作对象1=_this.deepcopy_data.tree_data.全局鼠标操作对象1;

let urls=_this.deepcopy_data.tree_data.url;
_this.data.修改后端组件版本_request=request______({method:'post',url:urls.修改后端组件版本_url});
//通过路由获取当前项目  所在的 用户id  项目目录  项目id
let getQueryParams=function () {  
    const queryParams = {};  
    const urlParams = new URLSearchParams(window.location.search);  
    for (const [key, value] of urlParams.entries()) {  
        queryParams[key] = value;  
    }  
    return queryParams;  
}  
_this.data.params=getQueryParams();

_this.data.icon_data={
    
    
  297:{
    icon_class:"icon iconfont icon-fuzhi",
    hovertext:"复制组件id",
    add_show:false,
    click:async function(){
        console.log("当前路径:",_this.data.path)
      if(!_this.data.dir1_id){
        let path_l=_this.data.path.split(".");
        _this.data.dir1_id=path_l[path_l.length-3];
        _this.data.dir2_id=path_l[path_l.length-2];
        _this.data.temp_id=path_l[path_l.length-1];
    }
    
    let copy_data=_this.data.info.temp_id+'_'+_this.data.info.version;
      copy_text(copy_data); 
      Vue.prototype.$notify({type: 'success',message: '已拷贝:'+copy_data})

  },
},
}


}

})

Vue.component2('a_1_0_2_22_1', {  
    template: `
        <div  :class="{ 'a_1_0_2_22_1_lines test': data.true, 'a_1_0_2_22_1_lines_onclick': data.onclick_flag }" @click="handle_click" v-show="show_flag">
        <span :style="'padding-left: '+data._space_+'px;'"></span>
        
        <span  v-if="data.icon1_show_flag":class="{'icon iconfont':data.true,'icon-right':data.close,'icon-down':data.close==false}"></span>
        
        <span class="a_1_0_2_22_1_hid_line"  style="color:#bcbcbc">{{data.name}}</span>
        <div style="display:inline-block;flex:1;">
        <div style="display:flex;
    justify-content: flex-end;
    display: flex;">
    
        <div  @click="click1($event,k)" v-for="(v,k) in data.icon_data"
        :key="k">
         <a_1_0_3_0_0 style="display: inline-block;"
         :deepcopy_data="v"></a_1_0_3_0_0>
        </div>
        </div>
        </div>



















        </div>
`,
data(){
    return{
        show_flag:true,
        data:{
            onclick_flag:false,
            tree_data:{},//
            icon_data:{},
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            recv_data:null,
            false:false,
            close:true,
            name:"",
            _space_:0,
        }
    }
},
methods:{
    handle_click:async function(event){
        //点击当前 高亮显示
        try{//console.log("高亮",this.data.path);
this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
        // /* console.log("我点击了一次")*/
        try{
            // if(!this.data.recv_data){
                // await this.data.刷新();
            // }
            
        
            /*console.log("?2")*/}
        catch{}

        if (this.data.click){
            try{
                this.data.click(event)
            
                // console.log("start click2")
            }
            catch{}
            return 
        }


        if (this.data.click_obj){
            try{
                lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
            
                // console.log("start click3")
            }
            catch{}
            return 
        }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    },
    click1:async function(event,k){
       /* console.log(',,,',this.data.icon_data[k].click)*/
        lhp_run_func(this.data.icon_data[k].click);
        if(!this.data.click_stop){event.stopPropagation();}//阻止父级

    }
},

mounted:function(){
    let urls=_this.deepcopy_data.tree_data.url;
_this.data.粘贴前端目录1_request=request______({method:'post',url:urls.粘贴前端目录1_url});
//通过路由获取当前项目  所在的 用户id  项目目录  项目id
let getQueryParams=function () {  
    const queryParams = {};  
    const urlParams = new URLSearchParams(window.location.search);  
    for (const [key, value] of urlParams.entries()) {  
        queryParams[key] = value;  
    }  
    return queryParams;  
}  

let params=getQueryParams();
_this.data.icon_data={
    198:{

    icon_class:"icon iconfont icon-zhantie",
    hovertext:"粘贴目录1",
    add_show:false,
    click:async function(){
        try {
            let text = await navigator.clipboard.readText();
            if(text.split("_").length!=3){
                _this.$message({
                    type: 'error',
                    message: '数据格式不符合a_xx_xx'
                  });      
                return
            }
            console.log('粘贴板中的文本: ' + text);
            let par=JSON.parse(JSON.stringify(params));
            par.text=text;
            _this.data.粘贴前端目录1_request({
                body_data:par,
            });
          } catch (err) {
            
            _this.$message({
                type: 'error',
                message: '无法读取粘贴板内容:'  + err.message
              });      
          }
        },
    },
    199:{

    icon_class:"icon iconfont icon-add_dir1",
    hovertext:"新建目录1",
    click:async function(){
        _this.$prompt('修改目录名称', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
          }).then(({ value }) => {try{ 
          let update_val={
          "type":"change_data",
          "data_type":"set_list",
          "update_params":[
          
                      {
                      "name":'@add_index',
                      "path":`page_config.dict.2.base_info.index`,
                      "use":"++s"
                      }
          ],
          "postput":[
          {
              'path':`page_config.dict.2.dict.@add_index`,
              'data':{"base_info": {
                "vue_name":"a_1_0_2_23_1",
                "index": 0,
                "deepcopy_data": {
                    "name":value
                }
            },
            "dict": {
            }}
          },
          {
              'path':`page_config.dict.2.base_info`,
              'data':{"index":"@add_index"}
          },
          ],
          }
        _this.data.tree_data.全局配置对象.更新(update_val);

        }catch (err){console.log("err",err);
}
          }).catch(() => {
            _this.$message({
              type: 'info',
              message: '取消输入'
            });       
          });},
    },
}


}

})

Vue.component2('a_1_0_2_23_1', {  
    template: `
        <div  :class="{ 'a_1_0_2_23_1_lines test': data.true, 'a_1_0_2_23_1_lines_onclick': data.onclick_flag }" @click="handle_click" v-show="show_flag">
        <span :style="'padding-left: '+data._space_+'px;'"></span>
        <span  v-if="data.icon1_show_flag":class="{'icon iconfont':data.true,'icon-right':data.close,'icon-down':data.close==false}"></span>
        
        <span class="a_1_0_2_23_1_hid_line"  style="color:#bcbcbc">{{data.name}}</span>
        <div style="display:inline-block;flex:1;">
        <div style="display:flex;
    justify-content: flex-end;
    display: flex;">
    
        <div  @click="click1($event,k)" v-for="(v,k) in data.icon_data"
        :key="k">
         <a_1_0_3_0_0 style="display: inline-block;"
         :deepcopy_data="v"></a_1_0_3_0_0>
        </div>
        </div>
        </div>



















        </div>
`,
data(){
    return{
        show_flag:true,
        data:{
            onclick_flag:false,
            tree_data:{},//
            icon_data:{},
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            recv_data:null,
            false:false,
            close:true,
            name:"",
            _space_:0,
        }
    }
},
methods:{
    handle_click:async function(event){
        //点击当前 高亮显示
        try{//console.log("高亮",this.data.path);
this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
        // /* console.log("我点击了一次")*/
        try{
            // if(!this.data.recv_data){
                // await this.data.刷新();
            // }
            
        
            /*console.log("?2")*/}
        catch{}

        if (this.data.click){
            try{
                this.data.click(event)
            
                // console.log("start click2")
            }
            catch{}
            return 
        }


        if (this.data.click_obj){
            try{
                lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
            
                // console.log("start click3")
            }
            catch{}
            return 
        }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    },
    click1:async function(event,k){
       /* console.log(',,,',this.data.icon_data[k].click)*/
        lhp_run_func(this.data.icon_data[k].click);
        if(!this.data.click_stop){event.stopPropagation();}//阻止父级

    }
},

mounted:function(){
    let urls=_this.deepcopy_data.tree_data.url;
_this.data.粘贴前端目录2_request=request______({method:'post',url:urls.粘贴前端目录2_url});
//通过路由获取当前项目  所在的 用户id  项目目录  项目id
let getQueryParams=function () {  
    const queryParams = {};  
    const urlParams = new URLSearchParams(window.location.search);  
    for (const [key, value] of urlParams.entries()) {  
        queryParams[key] = value;  
    }  
    return queryParams;  
}  

let params=getQueryParams();

_this.data.icon_data={
    198:{

    icon_class:"icon iconfont icon-zhantie",
    hovertext:"粘贴目录2",
    add_show:false,
    click:async function(){
        

        try {
            let text = await navigator.clipboard.readText();
            if(text.split("_").length!=4){
                _this.$message({
                    type: 'error',
                    message: '数据格式不符合a_xx_xx_xx'
                  });      
                return
            }
            console.log('粘贴板中的文本: ' + text);
            let par=JSON.parse(JSON.stringify(params));
            par.text=text;
            par.key=_this.data.path;
            _this.data.粘贴前端目录2_request({
                body_data:par,
            });
          } catch (err) {
            
            _this.$message({
                type: 'error',
                message: '无法读取粘贴板内容:'  + err.message
              });      
          }
        
        },
    },
    199:{

    icon_class:"icon iconfont icon-add_dir2",
    hovertext:"新建目录2",
    click:async function(){
        _this.$prompt('新建目录2名称', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
          }).then(({ value }) => {
            try{ if(!_this.data.dir1_id){
                let path_lst=_this.data.path.split(".");
                console.log("###############path_lst",_this.data.path,path_lst,path_lst[1])
                _this.data.dir1_id=path_lst[1];
            }
              let update_val={
              "type":"change_data",
              "data_type":"set_list",
              "update_params":[
              
                          {
                          "name":'@add_index',
                          "path":`page_config.dict.2.dict.${_this.data.dir1_id}.base_info.index`,
                          "use":"++s"
                          }
              ],
              "postput":[
              {
                  'path':`page_config.dict.2.dict.${_this.data.dir1_id}.dict.@add_index`,
                  'data':{"base_info": {
                    "vue_name":"a_1_0_2_20_1",
                    "index": 0,
                    "deepcopy_data": {
                        "name":value
                    }
                },
                "dict": {
                }}
              },
              {
                  'path':`page_config.dict.2.dict.${_this.data.dir1_id}.base_info`,
                  'data':{"index":"@add_index"}
              },
              ],
              }
            _this.data.tree_data.全局配置对象.更新(update_val);

            }catch (err){console.log("err",err);
}
           
          }
        
        
        
        ).catch(() => {
            _this.$message({
              type: 'info',
              message: '取消输入'
            });       
          });},
    },
}


}

})


Vue.component2('a_1_0_2_24_1', {  
    template: `
        <div  :class="{ 'a_1_0_2_24_1_lines test': data.true, 'a_1_0_2_24_1_lines_onclick': data.onclick_flag }" @click="handle_click" v-show="show_flag">
        <span :style="'padding-left: '+data._space_+'px;'"></span>
        <span  v-if="data.icon1_show_flag":class="{'icon iconfont':data.true,'icon-right':data.close,'icon-down':data.close==false}"></span>
        
        <span class="a_1_0_2_24_1_hid_line"  style="color:#bcbcbc">{{data.name}}</span>
        <div style="display:inline-block;flex:1;">
        <div style="display:flex;
    justify-content: flex-end;
    display: flex;">
    
        <div  @click="click1($event,k)" v-for="(v,k) in data.icon_data"
        :key="k">
         <a_1_0_3_0_0 style="display: inline-block;"
         :deepcopy_data="v"></a_1_0_3_0_0>
        </div>
        </div>
        </div>



















        </div>
`,
data(){
    return{
        show_flag:true,
        data:{
            onclick_flag:false,
            tree_data:{},//
            icon_data:{},
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            recv_data:null,
            false:false,
            close:true,
            name:"",
            _space_:0,
        }
    }
},
methods:{
    handle_click:async function(event){
        //点击当前 高亮显示
        try{//console.log("高亮",this.data.path);
this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
        // /* console.log("我点击了一次")*/
        try{
            // if(!this.data.recv_data){
                // await this.data.刷新();
            // }
            
        
            /*console.log("?2")*/}
        catch{}

        if (this.data.click){
            try{
                this.data.click(event)
            
                // console.log("start click2")
            }
            catch{}
            return 
        }


        if (this.data.click_obj){
            try{
                lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
            
                // console.log("start click3")
            }
            catch{}
            return 
        }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    },
    click1:async function(event,k){
       /* console.log(',,,',this.data.icon_data[k].click)*/
        lhp_run_func(this.data.icon_data[k].click);
        if(!this.data.click_stop){event.stopPropagation();}//阻止父级

    }
},

mounted:function(){

    let urls=_this.deepcopy_data.tree_data.url;
_this.data.粘贴前端组件_request=request______({method:'post',url:urls.粘贴前端组件_url});
//通过路由获取当前项目  所在的 用户id  项目目录  项目id
let getQueryParams=function () {  
    const queryParams = {};  
    const urlParams = new URLSearchParams(window.location.search);  
    for (const [key, value] of urlParams.entries()) {  
        queryParams[key] = value;  
    }  
    return queryParams;  
}  

let params=getQueryParams();
_this.data.icon_data={
    198:{

    icon_class:"icon iconfont icon-zhantie",
    hovertext:"粘贴组件",
    add_show:false,
    click:async function(){
 
        try {
            let text = await navigator.clipboard.readText();
            if(text.split("_").length!=6){
                _this.$message({
                    type: 'error',
                    message: '数据格式不符合a_xx_xx_xx_xx_xx'
                  });      
                return
            }
            console.log('粘贴板中的文本: ' + text);
            let par=JSON.parse(JSON.stringify(params));
            par.text=text;
            par.key=_this.data.path;
            _this.data.粘贴前端组件_request({
                body_data:par,
            });
          } catch (err) {
            
            _this.$message({
                type: 'error',
                message: '无法读取粘贴板内容:'  + err.message
              });      
          }
        },
    },
}


}

})

Vue.component2('a_1_0_2_25_1_move_line', {  
    template: `
        <div style="position:absolute" id="a_1_0_2_25_1_move_line" class="a_1_0_2_25_1_lines2"
        
        >
    <div style="display: flex;
    align-items: center;
    flex-direction: column;
    border: 1px solid #b9b9b9;
    border-radius: 4px;
    padding-left: 4px;
    padding-right: 4px;">
        <span style="color:#bcbcbc">{{data.name}}</span>
        </div>
        </div>
`,
data(){
    return{
        show_flag:true,
        data:{
            name:"333",
            _space_:0,
        }
    }
}})


Vue.component2('a_1_0_2_25_1', {  
    template: `
        <div ref="dom" :class="{ 'a_1_0_2_25_1_lines test': data.true, 'a_1_0_2_25_1_lines_onclick': data.onclick_flag }" @click="handle_click" v-show="show_flag"
        
        
    @mousemove="mousemove_"  
    @mouseup="mouseup_" 
    @mouseleave="mouseleave_" 
    @mouseenter="mouseenter_"
    @mousedown="mousedown_"
        >
        <span :style="'padding-left: '+data._space_+'px;'"></span>
    <div style="display: flex;
    align-items: self-start;
    flex-direction: column;
    border-radius: 4px;
    padding-left: 4px;
    padding-right: 4px;">
        <img :src="'/read_temp_png?temp_id='+data.info.temp_id+'&type=page'"ondragstart="return false;" class="a_1_0_2_25_1_img_class"></img>


        <span  class="a_1_0_2_25_1_hid_line" style="color:#bcbcbc">{{data.name}}</span>
        </div>

        <div style="display:inline-block;flex:1;height:100%">
        <div style="display:flex;
    justify-content: flex-end;
    display: flex;height:100%">
    
        <div  @click="click1($event,k)" v-for="(v,k) in data.icon_data"
        :key="k">
         <a_1_0_3_0_0 style="display: inline-block;"
         :deepcopy_data="v"></a_1_0_3_0_0>
        </div>
        <div   style="
    color: rgba(231, 231, 231, 0.6);display: inline-block; border: 1px solid rgb(185, 185, 185);
    width: 20px;
    height: 100%;" 
@click="change_version">
        <div style="margin-top:3px">{{data.info.version}}</div>
        </div>
        </div>
        </div>



















        </div>
`,
data(){
    return{
        show_flag:true,
        data:{
            info:{temp_id:"","version":"0"},
            onclick_flag:false,
            tree_data:{},//
            icon_data:{},
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            recv_data:null,
            false:false,
            close:true,
            name:"",
            _space_:0,
        }
    }
},
methods:{
    mousemove_:function(event){

    },
    mouseup_:function(event){

    },
   mouseleave_:function(event){

   },
    mouseenter_:function(event){

    },
    change_version:function(){
        this.$prompt('输入版本号', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
          }).then(({ value }) => {
            try{

                let par=JSON.parse(JSON.stringify(this.data.params));
                par.value=value;
                par.key=this.data.info.temp_id+'_'+this.data.info.version;
                par.path=this.data.path;
                this.data.修改前端组件版本_request({
                    body_data:par,
                });
            }catch (err){
                console.log("err"+err)
            }
          }).catch(() => {
            this.$message({
              type: 'info',
              message: '取消输入'
            });       
          });
    },
    绘制跟随鼠标移动的dom:function(event){
        let xy=this.get_x_y(event,"dom");
        if(!window.a_1_0_2_25_1_move_obj){
            // 创建跟随鼠标的元素  
            let dom = document.createElement('a_1_0_2_25_1_move_line'); 
            dom.setAttribute('ref', 'ref_obj');
            document.body.appendChild(dom);  
            let vue_dct={'el':dom,data:{true:true,false:false,null:null,deepcopy_data:this.data}}
            window.a_1_0_2_25_1_move_obj=new Vue(vue_dct);
        }
        this.鼠标移动时移动dom(xy.x,xy.y);
        a_1_0_2_25_1_move_obj.$refs['ref_obj'].data.name=this.data.name;
        a_1_0_2_25_1_move_obj.$el.style.visibility='visible';
    },
    鼠标移动时移动dom:function(x,y){
        // 获取 ID 为 "xxx" 的 DOM 元素  
        var element = document.getElementById('a_1_0_2_25_1_move_line');  
        
        // 检查元素是否存在  
        if (element) {  
        // 设置 left 和 top 样式属性  
        element.style.left =(Number(x)-30)+'px'; 
        element.style.top =(Number(y)-30)+'px';  
        } else {  
        console.error('Element with ID "a_1_0_2_25_1_move_line" not found!');  
        }
    },
    鼠标移动时移动dom2:function(event){
        // 获取 ID 为 "xxx" 的 DOM 元素  
        var element = document.getElementById('a_1_0_2_25_1_move_line');  
        
        // 检查元素是否存在  
        if (element) {  
        // 设置 left 和 top 样式属性  
        element.style.left =(Number(event.clientX)-30)+'px'; 
        element.style.top =(Number(event.clientY)-30)+'px';  
        } else {  
        console.error('Element with ID "a_1_0_2_25_1_move_line" not found!');  
        }
    },
    鼠标up时回收dom:function(){
        let _this=this;
        console.log("释放dom2")
        this.data.全局鼠标操作对象1.unset_move({"key":"拖拽前端组件",
            key2:"鼠标移动时移动dom2",});
        this.data.全局鼠标操作对象1.unset_up({"key":"拖拽前端组件",
            key2:"鼠标up时回收dom",});
            this.data.全局鼠标操作对象1.set_data({
                key:"拖拽前端组件_move_flag",
                data:{"flag":false}
            });
            a_1_0_2_25_1_move_obj.$el.style.visibility='hidden';
    },
    mousedown_:function(event){
        let _this=this;
        console.log("_this.data.全局鼠标操作对象1",_this.data,_this.data.全局鼠标操作对象1)
        
        _this.data.全局鼠标操作对象1.set_move({
            key:"拖拽前端组件",
            key2:"鼠标移动时移动dom2",
            func:_this.鼠标移动时移动dom2,
        });
        _this.data.全局鼠标操作对象1.set_up({
            key:"拖拽前端组件",
            key2:"鼠标up时回收dom",
            func:_this.鼠标up时回收dom,
        });
        _this.data.全局鼠标操作对象1.set_data({
            key:"拖拽前端组件",
            data:_this.data.info
        });
        _this.data.全局鼠标操作对象1.set_data({
            key:"拖拽前端组件_move_flag",
            data:{"flag":true}
        });
        this.绘制跟随鼠标移动的dom(event);
    },





    handle_click:async function(event){
        //点击当前 高亮显示
        try{//console.log("高亮",this.data.path);
this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
        // /* console.log("我点击了一次")*/
        try{
            // if(!this.data.recv_data){
                // await this.data.刷新();
            // }
            
        
            /*console.log("?2")*/}
        catch{}

        if (this.data.click){
            try{
                this.data.click(event)
            
                // console.log("start click2")
            }
            catch{}
            return 
        }


        if (this.data.click_obj){
            try{
                lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
            
                // console.log("start click3")
            }
            catch{}
            return 
        }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    },
    click1:async function(event,k){
       /* console.log(',,,',this.data.icon_data[k].click)*/
        lhp_run_func(this.data.icon_data[k].click);
        if(!this.data.click_stop){event.stopPropagation();}//阻止父级

    }
},

mounted:function(){
_this.data.全局鼠标操作对象1=_this.deepcopy_data.tree_data.全局鼠标操作对象1;

let urls=_this.deepcopy_data.tree_data.url;
_this.data.修改前端组件版本_request=request______({method:'post',url:urls.修改前端组件版本_url});
//通过路由获取当前项目  所在的 用户id  项目目录  项目id
let getQueryParams=function () {  
    const queryParams = {};  
    const urlParams = new URLSearchParams(window.location.search);  
    for (const [key, value] of urlParams.entries()) {  
        queryParams[key] = value;  
    }  
    return queryParams;  
}  
_this.data.params=getQueryParams();

_this.data.icon_data={
    
    
  297:{
    icon_class:"icon iconfont icon-fuzhi",
    hovertext:"复制组件id",
    add_show:false,
    click:async function(){
        console.log("当前路径:",_this.data.path)
      if(!_this.data.dir1_id){
        let path_l=_this.data.path.split(".");
        _this.data.dir1_id=path_l[path_l.length-3];
        _this.data.dir2_id=path_l[path_l.length-2];
        _this.data.temp_id=path_l[path_l.length-1];
    }
    
    let copy_data=_this.data.info.temp_id+'_'+_this.data.info.version;
      copy_text(copy_data); 
      Vue.prototype.$notify({type: 'success',message: '已拷贝:'+copy_data})

  },
},
}


}

})


Vue.component2("a_1_0_2_26_1_dialog",{
    template:`
    <div>
  
    <el-dialog title="添加数据库" :visible.sync="dialogVisible" width="50%">
    <el-form :model="form">
      <el-form-item label="数据库 表的英文名称*">
        <el-input v-model="form.en_name"></el-input>
      </el-form-item>
      <el-form-item label="数据库 表的中文名称">
        <el-input v-model="form.ch_name"></el-input>
      </el-form-item>
      <el-form-item label="数据库 表解释">
        <el-input v-model="form.note"></el-input>
      </el-form-item>
      <div class="el-form-item">
  <div  style="
  font-size: 14px;
  color: #606266;
  line-height: 40px;
  padding: 0 12px 0 0;
  ">额外参数</div>
        <div class="el-form-item__content">
          <div v-for="(value,key) in form.ps" :key="key" class="extra-param-tree">
  <div class="key-value-pair">
            <input 
          type="text"
          class="el-input__inner"v-model="value.k" placeholder="key"></input>
            <input 
          type="text"
          class="el-input__inner"v-model="value.v" placeholder="Value" style="margin-left: 20px;"></input>
  <button type="button" class="el-button delete-btn el-button--danger" @click="removeExtraParam(key)"><span>删除</span></button>
          </div>
        </div>
        </div>
  <button type="button" class="el-button el-button--primary" @click="addExtraParam"><!----><!----><span>添加参数</span></button>
      </div>
    </el-form>
    <div slot="footer" class="dialog-footer">
      <el-button @click="dialogVisible = false">取消</el-button>
      <el-button type="primary" @click="submitForm">确定</el-button>
    </div>
  </el-dialog>
    </div>
    `,
    data(){
      return {
        
        dialogVisible: false,
        form: {
          index:1,
          en_name: '',//英文名称
          ch_name: '',//中文名称
          note: '',//解释
          ps:{//自定义参数
  "1":{"k":"params1","v":"value1"}
  }
      }
    }
  },
  watch:{
  },
  methods:{
    初始化:function(){
      this.form.en_name='';
      this.form.ch_name='';
      this.form.index=1;
      this.form.note='';
      this.$set(this.form,'ps',{
        "1":{"k":"params1","v":"value1"}
    });
      
    },
    addExtraParam() {
      this.form.index++;
      this.form.ps[this.form.index+'']={'k':'params'+this.form.index,'v':'value'+this.form.index};
      
      this.$set(this.form,'ps',JSON.parse(JSON.stringify(this.form.ps)));
    },
    removeExtraParam(index) {
      delete this.form.ps[index];
      this.$set(this.form,'ps',JSON.parse(JSON.stringify(this.form.ps)));
    },
    submitForm() {
      console.log(this.form);
      try{
        this.callback(this.form);
      }catch{}
      // 在这里实现提交到 SQLite3 数据库的逻辑
      this.dialogVisible = false;
    },
  }
  
  
  }
  
  )
  a_1_0_2_26_1_open_dialog=function(obj){
    let callback=obj.callback;
    if(!window.a_1_0_2_26_1_dialog_dom){
  
        new_dom = document.createElement('a_1_0_2_26_1_dialog');  
        new_dom.id = 'a_1_0_2_26_1_dialog'; // 为div设置一个唯一的ID 
        document.body.appendChild(new_dom);
        //设置dom属性 ref值为ref_obj
        new_dom.setAttribute('ref', 'ref_obj');
        let t_deepcopy_data=JSON.parse(JSON.stringify({}));
        new_dom.setAttribute(':deepcopy_data',"deepcopy_data");//初始化vue模板的参数
        let vue_dct={'el':new_dom,data:{true:true,false:false,null:null,deepcopy_data:t_deepcopy_data}}
        let new_vue=new Vue(vue_dct);
        // window.test_vue=new_vue;
        window.a_1_0_2_26_1_dialog_dom=new_vue.$el;
        // next_dom2=new_vue.$el;
        window.a_1_0_2_26_1_dialog_vue=new_vue.$refs.ref_obj;
    }
    window.a_1_0_2_26_1_dialog_vue.dialogVisible=true;
    window.a_1_0_2_26_1_dialog_vue.初始化();
    window.a_1_0_2_26_1_dialog_vue.callback=callback;
  }

Vue.component2('a_1_0_2_26_1', {  
    template: `
        <div  :class="{ 'a_1_0_2_26_1_lines test': data.true, 'a_1_0_2_26_1_lines_onclick': data.onclick_flag }" @click="handle_click" v-show="show_flag">
        <span :style="'padding-left: '+data._space_+'px;'"></span>
        <span  v-if="data.icon1_show_flag":class="{'icon iconfont':data.true,'icon-right':data.close,'icon-down':data.close==false}"></span>
        
        <span  class="a_1_0_2_26_1_hid_line" style="color:#bcbcbc">{{data.name}}</span>
        <div style="display:inline-block;flex:1;">
        <div style="display:flex;
    justify-content: flex-end;
    display: flex;">
    
        <div  @click="click1($event,k)" v-for="(v,k) in data.icon_data"
        :key="k">
         <a_1_0_3_0_0 style="display: inline-block;"
         :deepcopy_data="v"></a_1_0_3_0_0>
        </div>
        </div>
        </div>
        </div>
`,
data(){
    return{
        show_flag:true,
        data:{
            onclick_flag:false,
            tree_data:{},//
            icon_data:{},
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            false:false,
            close:true,
            name:"",
            _space_:0,
        }
    }
},
methods:{
    handle_click:async function(event){
        //点击当前 高亮显示
        try{//console.log("高亮",this.data.path);
this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
        // /* console.log("我点击了一次")*/
        try{
            if(!this.data.tree_data.check_dct[this.data.path]){
                await this.data.刷新目录1();
            }
            /*console.log("?2")*/}
        catch{}

        if (this.data.click){
            try{
                this.data.click(event)
            
                // console.log("start click2")
            }
            catch{}
            return 
        }


        if (this.data.click_obj){
            try{
                lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
            
                // console.log("start click3")
            }
            catch{}
            return 
        }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    },
    click1:async function(event,k){
       /* console.log(',,,',this.data.icon_data[k].click)*/
        lhp_run_func(this.data.icon_data[k].click);
        if(!this.data.click_stop){event.stopPropagation();}//阻止父级

    }
},

mounted:function(){
    /*console.log("210的deepcopydata",_this.deepcopy_data)*/
let tree_data=_this.deepcopy_data.tree_data;
_this.data.全局配置对象=tree_data['全局配置对象'];
_this.data.add_new=function(data){
    
//     index:1,
//     en_name: '',//英文名称
//     ch_name: '',//中文名称
//     note: '',//解释
//     ps:{//自定义参数
// "1":{"k":"params1","v":"value1"}
// }
//更新数据 
data=JSON.parse(JSON.stringify(data));
let base_info={
    "index":0,
    "vue_name":"a_1_0_2_28_1",
    'deepcopy_data':JSON.parse(JSON.stringify(data))
}
base_info['deepcopy_data']['name']=data['en_name']+`[${data['ch_name']}]`;
//更新数据 
let update_val={
    "type":"change_data",
    "data_type":"set_list",//类型 修改数据
    update_params:[
      {//将路径为path的数据 进行 +1操作 并且存入属性add中 提供给data里面携带@add的属性调用
        name:'@index',
        path:`db_config.dict.1.base_info.index`,//数据路径
        use:'++s'
      },
    ],
    "postput":[{
        'path':`db_config.dict.1.dict.@index`,
        'data':{
            "base_info":base_info,
            "dict":{}
        }
      },
      {
        'path':`db_config.dict.1.base_info`,
        'data':{
            "index":"@index",
        }
      },
    
    ],
  }
//向服务端websocket发送消息
_this.data.全局配置对象.更新(update_val);
}


_this.data.icon_data={
    90:{
        icon_class:"icon iconfont icon-path",
        hovertext:"复制配置路径,用于流程中配置设参",
        add_show:false,
        click:async function(){

        //     if(!_this.data.db_id){
        //         let path_l=_this.data.path.split(".");
        //         _this.data.dir1_id=path_l[path_l.length-1];
        //     }
        //   let copy_data=`a_${cookie_read("easyedit_userid")}_${_this.data.dir1_id}`
            copy_text('db_config.dict.1'); 
            Vue.prototype.$notify({type: 'success',message: '已拷贝配置路径:db_config.dict.1'})
        }
        },
    100:{
        icon_class:"icon iconfont icon-shujuku",
        hovertext:"添加新数据库",
        click:async function(){
            a_1_0_2_26_1_open_dialog({callback:_this.data.add_new});
        // _this.$prompt('输入新数据库', '提示', {
        //     confirmButtonText: '确定',
        //     cancelButtonText: '取消',
        //   }).then(({ value }) => {
        //     try{_this.data.add_new(value);}
        //     catch (err){
        //         console.log("出错..",err)
        //     }
            
        //   }).catch(() => {
        //     _this.$message({
        //       type: 'info',
        //       message: '取消输入'
        //     });       
        //   });
        }
        },
}


}

})

Vue.component2('a_1_0_2_27_1', {  
    template: `
        <div  :class="{ 'a_1_0_2_27_1_lines test': data.true, 'a_1_0_2_27_1_lines_onclick': data.onclick_flag }" @click="handle_click" v-show="show_flag">
        <span :style="'padding-left: '+data._space_+'px;'"></span>
        <span  v-if="data.icon1_show_flag":class="{'icon iconfont':data.true,'icon-right':data.close,'icon-down':data.close==false}"></span>
        
        <span  class="a_1_0_2_27_1_hid_line" style="color:#bcbcbc">{{data.name}}</span>
        <div style="display:inline-block;flex:1;">
        <div style="display:flex;
    justify-content: flex-end;
    display: flex;">
    
        <div  @click="click1($event,k)" v-for="(v,k) in data.icon_data"
        :key="k">
         <a_1_0_3_0_0 style="display: inline-block;"
         :deepcopy_data="v"></a_1_0_3_0_0>
        </div>
        </div>
        </div>
        </div>
`,
data(){
    return{
        show_flag:true,
        data:{
            onclick_flag:false,
            tree_data:{},//
            icon_data:{},
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            false:false,
            close:true,
            name:"",
            _space_:0,
        }
    }
},
methods:{
    handle_click:async function(event){
        //点击当前 高亮显示
        try{//console.log("高亮",this.data.path);
this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
        // /* console.log("我点击了一次")*/
        try{
            if(!this.data.tree_data.check_dct[this.data.path]){
                await this.data.刷新目录1();
            }
            /*console.log("?2")*/}
        catch{}

        if (this.data.click){
            try{
                this.data.click(event)
            
                // console.log("start click2")
            }
            catch{}
            return 
        }


        if (this.data.click_obj){
            try{
                lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
            
                // console.log("start click3")
            }
            catch{}
            return 
        }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    },
    click1:async function(event,k){
       /* console.log(',,,',this.data.icon_data[k].click)*/
        lhp_run_func(this.data.icon_data[k].click);
        if(!this.data.click_stop){event.stopPropagation();}//阻止父级

    }
},

mounted:function(){
    /*console.log("210的deepcopydata",_this.deepcopy_data)*/
let tree_data=_this.deepcopy_data.tree_data;
_this.data.全局配置对象=tree_data['全局配置对象'];
_this.data.add_new=function(name){
    
//更新数据 

//更新数据 
let update_val={
    "type":"change_data",
    "data_type":"set_list",//类型 修改数据
    update_params:[
      {//将路径为path的数据 进行 +1操作 并且存入属性add中 提供给data里面携带@add的属性调用
        name:'@index',
        path:`flow_chat_config.dict.1.base_info.index`,//数据路径
        use:'++s'
      },
    ],
    "postput":[{
        'path':`flow_chat_config.dict.1.dict.@index`,
        'data':{
            "base_info":{
                "process_idx":0,//进程id
                "index":0,//拖拽进组件的id
                "process_dct":{},//存储进程id所属
                "deepcopy_data":{"name":name},"vue_name":"a_1_0_2_7_1","width":"2000px","height":"2000px","scale":"100"},
            "flow_dict":{},//存放当前正在处理的组件
            "dict":{}
        }
      },
      {
        'path':`flow_chat_config.dict.1.base_info`,
        'data':{
            "index":"@index",
        }
      },
    
    ],
  }
//向服务端websocket发送消息
_this.data.全局配置对象.更新(update_val);
}


_this.data.icon_data={
    // 100:{
    //     icon_class:"icon iconfont icon-houduan",
    //     hovertext:"添加新流程",
    //     click:async function(){
    //     _this.$prompt('输入新建流程名称', '提示', {
    //         confirmButtonText: '确定',
    //         cancelButtonText: '取消',
    //       }).then(({ value }) => {
    //         try{_this.data.add_new(value);}
    //         catch (err){
    //             console.log("出错..",err)
    //         }
            
    //       }).catch(() => {
    //         _this.$message({
    //           type: 'info',
    //           message: '取消输入'
    //         });       
    //       });
    //     }
    //     },
}


}

})

Vue.component2("a_1_0_2_28_1_dialog",{
  template:`
  <div>

  <el-dialog title="添加字段" :visible.sync="dialogVisible" width="50%">
  <el-form :model="form">
    <el-form-item label="字段英文名称*">
      <el-input v-model="form.en_name"></el-input>
    </el-form-item>
    <el-form-item label="字段中文名称">
      <el-input v-model="form.ch_name"></el-input>
    </el-form-item>
    <el-form-item label="字段类型*">
      <el-select v-model="form.field_type" placeholder="请选择字段类型">
        <el-option label="TEXT【字符串】" value="TEXT"></el-option>
        <el-option label="INTEGER【整数】" value="INTEGER"></el-option>
        <el-option label="BOOLEAN【布尔】" value="BOOLEAN"></el-option>
        <el-option label="DATETIME【日期】" value="DATETIME"></el-option>
      </el-select>
    </el-form-item>
    <el-form-item label="字段默认值*" v-if="form.field_type === 'INTEGER' " >
        <div class="input-container">

      <div @click="form.default_value--"style="
    width: 20px;
    font-size: 55px;">-</div>

      <input

        type="text"
        v-model.number="form.default_value"
        @input="validateInput"
        class="el-input__inner"

        placeholder="输入数值"

      />

      <div  @click="form.default_value++" style="
    width: 20px;
    font-size: 55px;">+</div>

    </div>
    </el-form-item>
    <el-form-item label="字段默认值*" v-if="form.field_type === 'TEXT' " >
      <div class="el-select">
      <input
        type="text"
        class="el-input__inner"
        v-model.number="form.default_value"
        placeholder="输入数值"
      /></div>
    </el-form-item>
    
    <el-form-item label="字段默认值*" v-if="form.field_type === 'DATETIME' ">
      <el-select v-model="form.default_value" placeholder="请选择字段类型">
        <el-option label="create_time【创建时间】" value="create_time"></el-option>
        <el-option label="update_time【更新时间】" value="update_time"></el-option>
      </el-select>
    </el-form-item>

    <el-form-item label="字段默认值*" v-if="form.field_type === 'BOOLEAN' ">
      <el-select v-model="form.default_value" placeholder="请选择字段类型">
        <el-option label="True【是】" value="true"></el-option>
        <el-option label="False【否】" value="false"></el-option>
      </el-select>
    </el-form-item>
      
    <el-form-item label="索引类型*">
      <el-select v-model="form.index_type" placeholder="请选择索引类型">
        <el-option label="None【无】" value="None"></el-option>
        <el-option label="PRIMARY KEY【主键】" value="PRIMARY KEY"></el-option>
        <el-option label="Unique Index【唯一索引】" value="Unique Index"></el-option>
        <el-option label="Index【索引】" value="Index"></el-option>
      </el-select>
    </el-form-item>





    <el-form-item label="字段解释">
      <el-input v-model="form.note"></el-input>
    </el-form-item>
    <div class="el-form-item">
<div  style="
font-size: 14px;
color: #606266;
line-height: 40px;
padding: 0 12px 0 0;
">额外参数</div>
      <div class="el-form-item__content">
        <div v-for="(value,key) in form.ps" :key="key" class="extra-param-tree">
<div class="key-value-pair">
          <input 
        type="text"
        class="el-input__inner"v-model="value.k" placeholder="key"></input>
          <input 
        type="text"
        class="el-input__inner"v-model="value.v" placeholder="Value" style="margin-left: 20px;"></input>
<button type="button" class="el-button delete-btn el-button--danger" @click="removeExtraParam(key)"><span>删除</span></button>
        </div>
      </div>
      </div>
<button type="button" class="el-button el-button--primary" @click="addExtraParam"><!----><!----><span>添加参数</span></button>
    </div>
  </el-form>
  <div slot="footer" class="dialog-footer">
    <el-button @click="dialogVisible = false">取消</el-button>
    <el-button type="primary" @click="submitForm">确定</el-button>
  </div>
</el-dialog>
  </div>
  `,
  data(){
    return {
      
      dialogVisible: false,
      form: {
        index:1,
        en_name: '',//字段英文名称
        field_type: '',//字段类型
        default_value: '',//字段默认值
        ch_name: '',//字段中文名称
        index_type:'None',//索引类型 默认无
        note: '',//字段解释
        ps:{//字段 自定义参数
"1":{"k":"params1","v":"value1"}
}
    }
  }
},
watch:{
"form.field_type":function(e){
  // <el-option label="TEXT【字符串】" value="TEXT"></el-option>
  // <el-option label="INTEGER【整数】" value="INTEGER"></el-option>
  // <el-option label="BOOLEAN【布尔】" value="BOOLEAN"></el-option>
  // <el-option label="DATETIME【日期】" value="DATETIME"></el-option>
if(e=='INTEGER'){
  this.form.default_value=0;
}else if(e=='TEXT'){
  this.form.default_value='';
}else if(e=='BOOLEAN'){
  this.form.default_value='true';
}else if(e=='DATETIME'){
  this.form.default_value='create_time';
}
}
},
methods:{
  初始化:function(data){
      if(data){
          this.form.en_name=data.en_name;
          this.form.field_type=data.field_type;
          this.form.default_value=data.default_value;
          this.form.ch_name=data.ch_name;
          this.form.note=data.note;
          this.form.index_type=data.index_type;
          this.form.index=data.index;
          this.$set(this.form,'ps',JSON.parse(JSON.stringify(data.ps)));
      }else{
          
  this.form.en_name='';
  this.form.field_type='INTEGER';
  this.form.default_value=0;
  this.form.ch_name='';
  this.form.note='';
  this.form.index_type='None';
  this.form.index=1;
  this.$set(this.form,'ps',{
    "1":{"k":"params1","v":"value1"}
});
      }
    
  },
  validateInput(event) {
    // 获取输入框的值
    let value = event.target.value;
    
    // 去除非数值字符，如果为空则置为0
    value = value.replace(/\D/g, '');
    value = value === '' ? 0 : parseInt(value, 10);
    
    // 由于 v-model.number 会自动将输入转换为数字，我们在这里也直接设置数字
    this.form.default_value = isNaN(value) ? 0 : value;
  },
  increment() {
    this.form.default_value++;
  },
  decrement() {
    if (this.form.default_value > 0) {
      this.form.default_value--;
    }
  },
  addExtraParam() {
    this.form.index++;
    this.form.ps[this.form.index+'']={'k':'params'+this.form.index,'v':'value'+this.form.index};
    
    this.$set(this.form,'ps',JSON.parse(JSON.stringify(this.form.ps)));
  },
  removeExtraParam(index) {
    delete this.form.ps[index];
    this.$set(this.form,'ps',JSON.parse(JSON.stringify(this.form.ps)));
  },
  submitForm() {
    console.log(this.form);
    try{
      this.callback(this.form);
    }catch{}
    // 在这里实现提交到 SQLite3 数据库的逻辑
    this.dialogVisible = false;
  },
}


}

)
a_1_0_2_28_1_open_dialog=function(obj){
  let data=obj.data;
  let callback=obj.callback;
  if(!window.a_1_0_2_28_1_open_dialog_dom){

      new_dom = document.createElement('a_1_0_2_28_1_dialog');  
      new_dom.id = 'a_1_0_2_28_1_dialog'; // 为div设置一个唯一的ID 
      document.body.appendChild(new_dom);
      //设置dom属性 ref值为ref_obj
      new_dom.setAttribute('ref', 'ref_obj');
      let t_deepcopy_data=JSON.parse(JSON.stringify({}));
      new_dom.setAttribute(':deepcopy_data',"deepcopy_data");//初始化vue模板的参数
      let vue_dct={'el':new_dom,data:{true:true,false:false,null:null,deepcopy_data:t_deepcopy_data}}
      let new_vue=new Vue(vue_dct);
      // window.test_vue=new_vue;
      window.a_1_0_2_28_1_open_dialog_dom=new_vue.$el;
      // next_dom2=new_vue.$el;
      window.a_1_0_2_28_1_open_dialog_vue=new_vue.$refs.ref_obj;
  }
  window.a_1_0_2_28_1_open_dialog_vue.dialogVisible=true;
  
  window.a_1_0_2_28_1_open_dialog_vue.初始化(data);
  window.a_1_0_2_28_1_open_dialog_vue.callback=callback;
}

Vue.component2("a_1_0_2_28_1_2_dialog",{
  template:`
  <div>

  <el-dialog title="添加数据库" :visible.sync="dialogVisible" width="50%">
  <el-form :model="form">
    <el-form-item label="数据库 表的英文名称*">
      <el-input v-model="form.en_name"></el-input>
    </el-form-item>
    <el-form-item label="数据库 表的中文名称">
      <el-input v-model="form.ch_name"></el-input>
    </el-form-item>
    <el-form-item label="数据库 表解释">
      <el-input v-model="form.note"></el-input>
    </el-form-item>
    <div class="el-form-item">
<div  style="
font-size: 14px;
color: #606266;
line-height: 40px;
padding: 0 12px 0 0;
">额外参数</div>
      <div class="el-form-item__content">
        <div v-for="(value,key) in form.ps" :key="key" class="extra-param-tree">
<div class="key-value-pair">
          <input 
        type="text"
        class="el-input__inner"v-model="value.k" placeholder="key"></input>
          <input 
        type="text"
        class="el-input__inner"v-model="value.v" placeholder="Value" style="margin-left: 20px;"></input>
<button type="button" class="el-button delete-btn el-button--danger" @click="removeExtraParam(key)"><span>删除</span></button>
        </div>
      </div>
      </div>
<button type="button" class="el-button el-button--primary" @click="addExtraParam"><!----><!----><span>添加参数</span></button>
    </div>
  </el-form>
  <div slot="footer" class="dialog-footer">
    <el-button @click="dialogVisible = false">取消</el-button>
    <el-button type="primary" @click="submitForm">确定</el-button>
  </div>
</el-dialog>
  </div>
  `,
  data(){
    return {
      
      dialogVisible: false,
      form: {
        index:1,
        en_name: '',//英文名称
        ch_name: '',//中文名称
        note: '',//解释
        ps:{//自定义参数
"1":{"k":"params1","v":"value1"}
}
    }
  }
},
watch:{
},
methods:{
  初始化:function(data){
    this.form.en_name=data.en_name;
    this.form.ch_name=data.ch_name;
    this.form.index=data.index;
    this.form.note=data.note;
    this.$set(this.form,'ps',JSON.parse(JSON.stringify(data.ps)));
    
  },
  addExtraParam() {
    this.form.index++;
    this.form.ps[this.form.index+'']={'k':'params'+this.form.index,'v':'value'+this.form.index};
    
    this.$set(this.form,'ps',JSON.parse(JSON.stringify(this.form.ps)));
  },
  removeExtraParam(index) {
    delete this.form.ps[index];
    this.$set(this.form,'ps',JSON.parse(JSON.stringify(this.form.ps)));
  },
  submitForm() {
    console.log(this.form);
    try{
      this.callback(this.form);
    }catch{}
    // 在这里实现提交到 SQLite3 数据库的逻辑
    this.dialogVisible = false;
  },
}


}

)
a_1_0_2_28_1_2_open_dialog=function(obj){
  let data=obj.data;
  let callback=obj.callback;
  if(!window.a_1_0_2_28_1_2_dialog_dom){

      new_dom = document.createElement('a_1_0_2_28_1_2_dialog');  
      new_dom.id = 'a_1_0_2_28_1_2_dialog'; // 为div设置一个唯一的ID 
      document.body.appendChild(new_dom);
      //设置dom属性 ref值为ref_obj
      new_dom.setAttribute('ref', 'ref_obj');
      let t_deepcopy_data=JSON.parse(JSON.stringify({}));
      new_dom.setAttribute(':deepcopy_data',"deepcopy_data");//初始化vue模板的参数
      let vue_dct={'el':new_dom,data:{true:true,false:false,null:null,deepcopy_data:t_deepcopy_data}}
      let new_vue=new Vue(vue_dct);
      // window.test_vue=new_vue;
      window.a_1_0_2_28_1_2_dialog_dom=new_vue.$el;
      // next_dom2=new_vue.$el;
      window.a_1_0_2_28_1_2_dialog_vue=new_vue.$refs.ref_obj;
  }
  window.a_1_0_2_28_1_2_dialog_vue.dialogVisible=true;
  window.a_1_0_2_28_1_2_dialog_vue.初始化(data);
  window.a_1_0_2_28_1_2_dialog_vue.callback=callback;
}

Vue.component2('a_1_0_2_28_1', {  
    template: `
        <div  :class="{ 'a_1_0_2_28_1_lines test': data.true, 'a_1_0_2_28_1_lines_onclick': data.onclick_flag }" @click="handle_click" v-show="show_flag">
        <span :style="'padding-left: '+data._space_+'px;'"></span>
        <span  v-if="data.icon1_show_flag":class="{'icon iconfont':data.true,'icon-right':data.close,'icon-down':data.close==false}"></span>
        
        <span  class="a_1_0_2_28_1_hid_line" style="color:#bcbcbc">{{data.name}}</span>
        <div style="display:inline-block;flex:1;">
        <div style="display:flex;
    justify-content: flex-end;
    display: flex;">
    
        <div  @click="click1($event,k)" v-for="(v,k) in data.icon_data"
        :key="k">
         <a_1_0_3_0_0 style="display: inline-block;"
         :deepcopy_data="v"></a_1_0_3_0_0>
        </div>
        </div>
        </div>

        </div>
`,
data(){
    return{
        show_flag:true,
        data:{
            onclick_flag:false,
            tree_data:{},//
            icon_data:{},
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            false:false,
            close:true,
            name:"",
            _space_:0,






        },
        
        dialogVisible: false,
        form: {
          index:1,
          en_name: '',
          field_type: '',
          default_value: '',
          ch_name: '',
          note: '',
          ps:{
"params1":""
}
        }
    }
},
methods:{
    init_val:function(){
      this.data.ps={};
    },
    handle_click:async function(event){
        //点击当前 高亮显示
        try{//console.log("高亮",this.data.path);
this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
        // /* console.log("我点击了一次")*/
        try{
            if(!this.data.tree_data.check_dct[this.data.path]){
                await this.data.刷新目录1();
            }
            /*console.log("?2")*/}
        catch{}

        if (this.data.click){
            try{
                this.data.click(event)
            
                // console.log("start click2")
            }
            catch{}
            return 
        }


        if (this.data.click_obj){
            try{
                lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
            
                // console.log("start click3")
            }
            catch{}
            return 
        }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    },
    click1:async function(event,k){
       /* console.log(',,,',this.data.icon_data[k].click)*/
        lhp_run_func(this.data.icon_data[k].click);
        if(!this.data.click_stop){event.stopPropagation();}//阻止父级

    }
},

mounted:function(){
    /*console.log("210的deepcopydata",_this.deepcopy_data)*/
let urls=_this.deepcopy_data.tree_data.url;
let tree_data=_this.deepcopy_data.tree_data;
_this.data.全局配置对象=tree_data['全局配置对象'];
_this.data.add_new=function(field_data){
  let base_info={
    deepcopy_data:JSON.parse(JSON.stringify(field_data)),
    vue_name:'a_1_0_2_29_1',
    index:0,
  }
  base_info['deepcopy_data']['name']=field_data['en_name']+`[${field_data['ch_name']}]`;
  
    try{
        if(!_this.data.db_id){
            let path_l=_this.data.path.split(".");
            _this.data.db_id=path_l[path_l.length-1];
        }
    }
    catch{}
//更新数据 

//更新数据 
let update_val={
    "type":"change_data",
    "data_type":"set_list",//类型 修改数据
    update_params:[
      {//将路径为path的数据 进行 +1操作 并且存入属性add中 提供给data里面携带@add的属性调用
        name:'@index',
        path:`db_config.dict.1.dict.${_this.data.db_id}.base_info.index`,//数据路径
        use:'++s'
      },
    ],
    "postput":[{
        'path':`db_config.dict.1.dict.${_this.data.db_id}.dict.@index`,
        'data':{base_info:base_info,dict:{}}//字段数据
      },
      {
        'path':`db_config.dict.1.dict.${_this.data.db_id}.base_info`,
        'data':{
            "index":"@index",
        }
      },
    
    ],
  }
//向服务端websocket发送消息
_this.data.全局配置对象.更新(update_val);
}

_this.data.change_data=function(data){
  try{
      if(!_this.data.db_id){
          let path_l=_this.data.path.split(".");
          _this.data.db_id=path_l[path_l.length-1];
      }
  }
  catch{}
  //更新数据 
let deepcopy_dat=JSON.parse(JSON.stringify(data));
deepcopy_dat['name']=data['en_name']+`[${data['ch_name']}]`;
  data['deepcopy_data']={"name":data['ch_name']}
  //更新数据 
  let update_val={
      "type":"change_data",
      "data_type":"set_list",//类型 修改数据
      "delete":[{
        "path":`db_config.dict.1.dict.${_this.data.db_id}.base_info.deepcopy_data.ps`
      }],
      "postput":[{
          'path':`db_config.dict.1.dict.${_this.data.db_id}.base_info.deepcopy_data`,
          'data':deepcopy_dat,
        },
      ],
    }
  //向服务端websocket发送消息
  _this.data.全局配置对象.更新(update_val);
}
function getQueryParams() {  
  const queryParams = {};  
  const urlParams = new URLSearchParams(window.location.search);  
  for (const [key, value] of urlParams.entries()) {  
      queryParams[key] = value;  
  }  
  return queryParams;  
}  








_this.data.复制建表结构_request=request______({method:'post',url:urls.复制建表结构_url});

_this.data.复制建表结构_recv=function(received_data){
    console.log("接收数据",received_data);
    if(received_data.type=='okk'){

      copy_text(received_data.message); 
      Vue.prototype.$notify({type: 'success',message: '已拷贝表'+_this.data.db_id})
    }
    复制建表结构_flag=true;
}
_this.data.复制建表结构=async function(){
  try{
      if(!_this.data.db_id){
          let path_l=_this.data.path.split(".");
          _this.data.db_id=path_l[path_l.length-1];
        _this.down_load_info=getQueryParams();
        _this.down_load_info.db_id=_this.data.db_id

      }
  }
  catch{}
    let count=0;
    _this.data.复制建表结构_flag=false;
    _this.data.复制建表结构_request({
        body_data:_this.down_load_info,
        execute_lst:[
                      {
                        'type':'func',
                        'func':_this.data.复制建表结构_recv,
                        'args':['received_data'],
                      },
                    ]
    });
    await time_sleep(20);
    while(1){
        count++;
        await time_sleep(1);
        if(_this.data.复制建表结构_flag==true){break}
        if(count>500){Vue.prototype.$notify({type: 'error',message: '复制建表结构失败'});break}
    }
}



_this.data.icon_data={
  98:{
      icon_class:"icon iconfont icon-fuzhi",
      hovertext:"fuzhi建表sql",
      add_show:false,
      click:async function(){
        _this.data.复制建表结构();



      },
    },
  99:{
      icon_class:"icon iconfont icon-write",
      hovertext:"修改属性",
      add_show:false,
      click:async function(){
        a_1_0_2_28_1_2_open_dialog({"data":_this.data,"callback":_this.data.change_data});
      },
    },
    100:{
        icon_class:"icon iconfont icon-ziduan",
        hovertext:"添加新字段",
        click:async function(){
          a_1_0_2_28_1_open_dialog({"callback":_this.data.add_new});
        }
        },
}


}

})


Vue.component2('a_1_0_2_29_1', {  
    template: `
        <div  :class="{ 'a_1_0_2_29_1_lines test': data.true, 'a_1_0_2_29_1_lines_onclick': data.onclick_flag }" @click="handle_click" v-show="show_flag">
        <span :style="'padding-left: '+data._space_+'px;'"></span>
        <span  class="icon iconfont icon-ziduan"></span>
        
        <span  class="a_1_0_2_29_1_hid_line" style="color:#bcbcbc">{{data.name}}</span>
        <div style="display:inline-block;flex:1;">
        <div style="display:flex;
    justify-content: flex-end;
    display: flex;">
    
        <div  @click="click1($event,k)" v-for="(v,k) in data.icon_data"
        :key="k">
         <a_1_0_3_0_0 style="display: inline-block;"
         :deepcopy_data="v"></a_1_0_3_0_0>
        </div>
        </div>
        </div>
        </div>
`,
data(){
    return{
        show_flag:true,
        data:{
            onclick_flag:false,
            tree_data:{},//
            icon_data:{},
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            false:false,
            close:true,
            name:"",
            _space_:0,
        }
    }
},
methods:{
    init_val:function(){
      this.data.ps={};
    },
    handle_click:async function(event){
        //点击当前 高亮显示
        try{//console.log("高亮",this.data.path);
this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
        // /* console.log("我点击了一次")*/
        try{
            if(!this.data.tree_data.check_dct[this.data.path]){
                await this.data.刷新目录1();
            }
            /*console.log("?2")*/}
        catch{}

        if (this.data.click){
            try{
                this.data.click(event)
            
                // console.log("start click2")
            }
            catch{}
            return 
        }


        if (this.data.click_obj){
            try{
                lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
            
                // console.log("start click3")
            }
            catch{}
            return 
        }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    },
    click1:async function(event,k){
       /* console.log(',,,',this.data.icon_data[k].click)*/
        lhp_run_func(this.data.icon_data[k].click);
        if(!this.data.click_stop){event.stopPropagation();}//阻止父级

    }
},

mounted:function(){
    /*console.log("210的deepcopydata",_this.deepcopy_data)*/
let tree_data=_this.deepcopy_data.tree_data;
_this.data.全局配置对象=tree_data['全局配置对象'];

  
  _this.data.change_data=function(data){
    try{
        if(!_this.data.db_id){
            let path_l=_this.data.path.split(".");
            _this.data.db_id=path_l[path_l.length-2];
            _this.data.field_id=path_l[path_l.length-1];
        }
    }
    catch{}
    //更新数据 
  let deepcopy_dat=JSON.parse(JSON.stringify(data));
  deepcopy_dat['name']=data['en_name']+`[${data['ch_name']}]`;
    data['deepcopy_data']={"name":data['ch_name']}
    //更新数据 
    let update_val={
        "type":"change_data",
        "data_type":"set_list",//类型 修改数据
        "delete":[{
          "path":`db_config.dict.1.dict.${_this.data.db_id}.dict.${_this.data.field_id}.base_info.deepcopy_data.ps`
        }],
        "postput":[{
            'path':`db_config.dict.1.dict.${_this.data.db_id}.dict.${_this.data.field_id}.base_info.deepcopy_data`,
            'data':deepcopy_dat,
          },
        ],
      }
    //向服务端websocket发送消息
    _this.data.全局配置对象.更新(update_val);
  }


_this.data.icon_data={
    99:{
        icon_class:"icon iconfont icon-write",
        hovertext:"修改属性",
        add_show:false,
        click:async function(){
            a_1_0_2_28_1_open_dialog({"data":_this.data,"callback":_this.data.change_data});
        },
      },
}


}

})

Vue.component2('a_1_0_2_3_0', {  
    template: `
        <div  :class="{ 'a_1_0_2_3_0_lines test': data.true, 'a_1_0_2_3_0_lines_onclick': data.onclick_flag }" @click="handle_click" v-show="show_flag">
        <span :style="'padding-left: '+data._space_+'px;'"></span>
        <span  v-if="data.icon1_show_flag":class="{'icon iconfont':data.true,'icon-right':data.close,'icon-down':data.close==false}"></span>
        
        <span  class="a_1_0_2_3_1_hid_line"style="color:#bcbcbc">{{data.name}}</span>
        <div style="display:inline-block;flex:1;">
        <div style="display:flex;
    justify-content: flex-end;
    display: flex;">
    
        <div  @click="click1($event,k)" v-for="(v,k) in data.icon_data"
        :key="k">
         <a_1_0_3_0_0 style="display: inline-block;"
         :deepcopy_data="v"></a_1_0_3_0_0>
        </div>
        </div>
        </div>
        </div>
`,
data(){
    return{
        show_flag:true,
        data:{
            onclick_flag:false,
            tree_data:{},//
            icon_data:{},
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            false:false,
            close:true,
            name:"",
            _space_:0,
        }
    }
},
methods:{

    handle_click:async function(event){
        //点击当前 高亮显示
        try{//console.log("高亮",this.data.path);
this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
        /* console.log("我点击了一次")*/
        try{
            /* console.log("?")*/
            if(!this.data.tree_data.check_dct[this.data.path]){
                await this.data.刷新前端组件();
            }
            /*console.log("?2")*/}
        catch{}

        if (this.data.click){
            try{
                this.data.click(event)
            
                // console.log("start click2")
            }
            catch{}
            return 
        }


        if (this.data.click_obj){
            try{
                lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
            
                // console.log("start click3")
            }
            catch{}
            return 
        }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    },
    click1:async function(event,k){
       /* console.log(',,,',this.data.icon_data[k].click)*/
        lhp_run_func(this.data.icon_data[k].click);
        if(!this.data.click_stop){event.stopPropagation();}//阻止父级

    }
},

mounted:function(){
    /*console.log("210的deepcopydata",_this.deepcopy_data)*/
    let urls=_this.deepcopy_data.tree_data.url;
    let check_dct=_this.deepcopy_data.tree_data.check_dct;
//   获取用户的前端组件库组件列表_url:'/get_ui_dir1',
//   获取用户的前端组件库组件列表_url:'/get_ui_dir2',
//   获取用户的前端组件库组件列表_url:'/get_ui_temp',
//   获取用户的前端组件库组件版本列表_url:'/get_ui_version',
//   添加前端组件_url:'/add_ui_dir1',
//   添加前端组件_url:'/add_ui_dir2',
//   添加前端组件_url:'/add_ui_temp',
//   添加前端组件版本_url:'/add_ui_version',
//   更新前端组件版本_url:'/update_ui_version',
//   修改前端目录2属性_url:'/change_ui_dir1'
//   修改前端目录2属性_url:'/change_ui_dir2'
//   修改前端目录2属性_url:'/change_ui_temp'



//   获取用户的后端组件库目录2列表_url:'/get_flow_dir1',
//   获取用户的后端组件库目录2列表_url:'/get_flow_dir2',
//   获取用户的后端组件库组件列表_url:'/get_flow_temp',
//   获取用户的后端组件库组件版本列表_url:'/get_ui_version',
//   添加后端目录2_url:'/add_flow_dir1',
//   添加后端目录2_url:'/add_flow_dir2',
//   添加后端组件_url:'/add_flow_temp',
//   添加后端组件版本_url:'/add_flow_version',
//   更新后端组件版本_url:'/update_flow_version',
_this.data.获取用户的前端组件库组件列表_flag=false;
_this.data.获取用户的前端组件库组件列表_request=request______({method:'post',url:urls.获取用户的前端组件库组件列表_url});
_this.data.获取用户的前端组件库组件列表_recv=function(received_data){
    /*console.log("接收数据",received_data,_this.data.path);*/
    _this.data.tree_data.set_dict(received_data.data,_this.data.path);
    check_dct[_this.data.path]=received_data;
    _this.data.获取用户的前端组件库组件列表_flag=true;
}
_this.data.刷新前端组件=async function(){
    if(!_this.data.dir1_id){
        let path_l=_this.data.path.split(".");
        _this.data.dir1_id=path_l[path_l.length-2];
        _this.data.dir2_id=path_l[path_l.length-1];
    }
    let count=0;
    _this.data.获取用户的前端组件库组件列表_flag=false;
    _this.data.获取用户的前端组件库组件列表_request({
        body_data:{dir1_id:_this.data.dir1_id,dir2_id:_this.data.dir2_id},
        execute_lst:[
                      {
                        'type':'func',
                        'func':_this.data.获取用户的前端组件库组件列表_recv,
                        'args':['received_data'],
                      },
                    ]
    });
    await time_sleep(20);
    while(1){
        count++;
        await time_sleep(1);
        if(_this.data.获取用户的前端组件库组件列表_flag==true){break}
        if(count>500){Vue.prototype.$notify({type: 'error',message: '获取前端目录2列表失败'});break}
    }
}



_this.data.添加前端组件_request=request______({method:'post',url:urls.添加前端组件_url});

_this.data.添加前端组件_recv=function(received_data){
    console.log("接收数据",received_data);
    _this.data.tree_data.set_dict(received_data,_this.data.path);
    _this.data.添加前端组件_flag=true;
}
_this.data.添加前端组件=async function(name){
    if(!_this.data.dir1_id){
        let path_l=_this.data.path.split(".");
        _this.data.dir1_id=path_l[path_l.length-2];
        _this.data.dir2_id=path_l[path_l.length-1];
    }
    let count=0;
    _this.data.添加前端组件_flag=false;
    _this.data.添加前端组件_request({
        body_data:{name:name,dir1_id:_this.data.dir1_id,dir2_id:_this.data.dir2_id},
        execute_lst:[
                      {
                        'type':'func',
                        'func':_this.data.添加前端组件_recv,
                        'args':['received_data'],
                      },
                    ]
    });
    await time_sleep(20);
    while(1){
        count++;
        await time_sleep(1);
        if(_this.data.添加前端组件_flag==true){break}
        if(count>500){Vue.prototype.$notify({type: 'error',message: '添加前端组件失败'});break}
    }
}




_this.data.修改前端目录2属性_request=request______({method:'post',url:urls.修改前端目录2属性_url});

findKeydeepcopy=function (obj, path = []){
    // 遍历对象的所有属性  
    for (let key in obj) {  
        if (obj.hasOwnProperty(key)) {  
            // 更新当前路径  
            let currentPath = [...path, key];  
  
            // 如果当前属性的 key 是 'aaa'，返回路径  
            if (key === 'deepcopy_data') {  
                return currentPath;  
            }  
  
            // 如果当前属性是对象，递归调用  
            if (typeof obj[key] === 'object' && obj[key] !== null) {  
                let result = findKeydeepcopy(obj[key], currentPath);  
                if (result) {  
                    return result;  
                }  
            }  
        }  
    }  
  
    // 如果没有找到 key 为 'aaa' 的对象，返回 null  
    return null;  
}  
_this.data.修改前端目录2属性_recv=function(received_data){
    console.log("接收数据",received_data);
    _this.data.修改前端目录2属性_flag=true;
    let lst=findKeydeepcopy(received_data);
    let copy_data=received_data;
    for(let i=0;i<lst.length;i++){copy_data=copy_data[lst[i]]}
    _this.data.tree_data.change_deepcopy_data(_this.data.path,copy_data);
}
_this.data.修改前端目录2属性=async function(name){
    if(!_this.data.dir1_id){
        let path_l=_this.data.path.split(".");
        _this.data.dir1_id=path_l[path_l.length-2];
        _this.data.dir2_id=path_l[path_l.length-1];
    }
    let count=0;
    _this.data.修改前端目录2属性_flag=false;
    _this.data.修改前端目录2属性_request({
        body_data:{name:name,dir1_id:_this.data.dir1_id,dir2_id:_this.data.dir2_id},
        execute_lst:[
                      {
                        'type':'func',
                        'func':_this.data.修改前端目录2属性_recv,
                        'args':['received_data'],
                      },
                    ]
    });
    await time_sleep(20);
    while(1){
        count++;
        await time_sleep(1);
        if(_this.data.修改前端目录2属性_flag==true){break}
        if(count>500){Vue.prototype.$notify({type: 'error',message: '修改前端目录2属性失败'});break}
    }
}


_this.data.icon_data={
    297:{
      icon_class:"icon iconfont icon-fuzhi",
      hovertext:"复制目录2id",
      add_show:false,
      click:async function(){
        if(!_this.data.dir1_id){
            let path_l=_this.data.path.split(".");
            _this.data.dir1_id=path_l[path_l.length-2];
            _this.data.dir2_id=path_l[path_l.length-1];
        }
      let copy_data=`a_${cookie_read("easyedit_userid")}_${_this.data.dir1_id}_${_this.data.dir2_id}`
        copy_text(copy_data); 
        Vue.prototype.$notify({type: 'success',message: '已拷贝:'+copy_data})
  
    },
  },
    330:{
        icon_class:"icon iconfont icon-write",
        hovertext:"修改前端目录2属性",
        add_show:false,
        click:async function(){
            _this.$prompt('修改前端目录2(名称)', '提示', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
              }).then(({ value }) => {
               _this.data.修改前端目录2属性(value);
              }).catch(() => {
                _this.$message({
                  type: 'info',
                  message: '取消输入'
                });       
              });},
        },
    331:{
        icon_class:"icon iconfont icon-refresh",
        hovertext:"刷新前端组件列表",
        add_show:false,
        click:async function(){
            /*console.log("开始刷新目录");*/
            _this.data.刷新前端组件();
        }
        },
    332:{

    icon_class:"icon iconfont icon-add_temp",
    hovertext:"添加前端组件",
    click:async function(){
        _this.$prompt('添加前端组件(名称)', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
          }).then(({ value }) => {
           _this.data.添加前端组件(value);
          }).catch(() => {
            _this.$message({
              type: 'info',
              message: '取消输入'
            });       
          });},
    },
}


}

})

Vue.component2('a_1_0_2_30_1', {  
    template: `
        <div  :class="{ 'a_1_0_2_30_1_lines test': data.true, 'a_1_0_2_30_1_lines_onclick': data.onclick_flag }" @click="handle_click" v-show="show_flag">
        <span :style="'padding-left: '+data._space_+'px;'"></span>
        <span  v-if="data.icon1_show_flag":class="{'icon iconfont':data.true,'icon-right':data.close,'icon-down':data.close==false}"></span>
        
        <span  class="a_1_0_2_30_1_hid_line" style="color:#bcbcbc">{{data.name}}</span>
        <div style="display:inline-block;flex:1;">
        <div style="display:flex;
    justify-content: flex-end;
    display: flex;">
    
        <div  @click="click1($event,k)" v-for="(v,k) in data.icon_data"
        :key="k">
         <a_1_0_3_0_0 style="display: inline-block;"
         :deepcopy_data="v"></a_1_0_3_0_0>
        </div>
        </div>
        </div>
        </div>
`,
data(){
    return{
        show_flag:true,
        data:{
            onclick_flag:false,
            tree_data:{},//
            icon_data:{},
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            false:false,
            close:true,
            name:"",
            _space_:0,
        }
    }
},
methods:{
    handle_click:async function(event){
        //点击当前 高亮显示
        try{//console.log("高亮",this.data.path);
this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
        // /* console.log("我点击了一次")*/
        try{
            if(!this.data.tree_data.check_dct[this.data.path]){
                await this.data.刷新目录1();
            }
            /*console.log("?2")*/}
        catch{}

        if (this.data.click){
            try{
                this.data.click(event)
            
                // console.log("start click2")
            }
            catch{}
            return 
        }


        if (this.data.click_obj){
            try{
                lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
            
                // console.log("start click3")
            }
            catch{}
            return 
        }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    },
    click1:async function(event,k){
       /* console.log(',,,',this.data.icon_data[k].click)*/
        lhp_run_func(this.data.icon_data[k].click);
        if(!this.data.click_stop){event.stopPropagation();}//阻止父级

    }
},

mounted:function(){
    /*console.log("210的deepcopydata",_this.deepcopy_data)*/
let tree_data=_this.deepcopy_data.tree_data;
_this.data.全局配置对象=tree_data['全局配置对象'];
_this.data.add_new=function(name){
    
//更新数据 

//更新数据 
let update_val={
    "type":"change_data",
    "data_type":"set_list",//类型 修改数据
    update_params:[
      {//将路径为path的数据 进行 +1操作 并且存入属性add中 提供给data里面携带@add的属性调用
        name:'@index',
        path:`page_config.dict.1.base_info.index`,//数据路径
        use:'++s'
      },
    ],
    "postput":[{
        'path':`page_config.dict.1.dict.@index`,
        'data':{
            "base_info":{
                "index":2,
                "deepcopy_data":{"name":name},"vue_name":"a_1_0_2_31_1"},
            "dict":{
                "1":{
                    "base_info":{
                        "index":0,
                        "deepcopy_data":{"name":"组件大纲"},"con":"1","vue_name":"a_1_0_2_34_1","width":"1960px","height":"1080px","scale":"55"
                    },
                    "dict":{},
                    "page_dict":{}
                },
                "2":{
                    "base_info":{
                        "index":0,
                        "deepcopy_data":{"name":"页面代码"},"vue_name":"a_1_0_2_36_1",
                    },
                    "dict":{}
                },
            }
        }
      },
      {
        'path':`page_config.dict.1.base_info`,
        'data':{
            "index":"@index",
        }
      },
    
    ],
  }
//向服务端websocket发送消息
_this.data.全局配置对象.更新(update_val);
}


_this.data.icon_data={
    100:{
        icon_class:"icon iconfont icon-qianduan",
        hovertext:"添加新页面",
        click:async function(){
        _this.$prompt('输入新页面名称', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
          }).then(({ value }) => {
            try{_this.data.add_new(value);}
            catch (err){
                console.log("出错..",err)
            }
            
          }).catch(() => {
            _this.$message({
              type: 'info',
              message: '取消输入'
            });       
          });
        }
        },
}


}

})

Vue.component2('a_1_0_2_31_1', {  
    template: `
        <div :class="{ 'a_1_0_2_31_1_lines test': data.true, 'a_1_0_2_31_1_lines_onclick': data.onclick_flag }" @click="handle_click" v-show="show_flag">
        <span :style="'padding-left: '+data._space_+'px;'"></span>
        <span  v-if="data.icon1_show_flag":class="{'icon iconfont':data.true,'icon-right':data.close,'icon-down':data.close==false}"></span>
        
        <span  class="a_1_0_2_31_1_hid_line" style="color:#bcbcbc">{{data.name}}</span>
        <div style="display:inline-block;flex:1;">
        <div style="display:flex;
    justify-content: flex-end;
    display: flex;">
    
        <div  @click="click1($event,k)" v-for="(v,k) in data.icon_data"
        :key="k">
         <a_1_0_3_0_0 style="display: inline-block;"
         :deepcopy_data="v"></a_1_0_3_0_0>
        </div>
        </div>
        </div>
        </div>
`,
data(){
    return{
        show_flag:true,
        data:{
          onclick_flag:false,
            tree_data:{},//
            icon_data:{},
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            false:false,
            close:true,
            name:"",
            _space_:0,
        }
    }
},
methods:{
  lhp_run_func:function(str_,obj=null,test=false){
      if (obj.includes(".")){
        try{

          let obj_t=window;
          let arr1= obj.split('.');  
          for (let i=0;i<arr1.length;i++){ obj_t=obj_t[arr1[i]]}
          obj=obj_t
        }catch(err){console.log("error:",err);
}
      }
      console.log("obj:",obj)
      if ((typeof str_) ==='function'){
          if (obj!=null){
              return str_(obj)
          }else{
              return str_()
          }
      }
      try{
          if (str_==''){return null;}
          else if (str_.includes('.')){
              let arr = str_.split('.');  
              let run_func=window
              for (let i=0;i<arr.length-1;i++){ run_func=run_func[arr[i]]}
              if (obj!=null){
                  if(test){console.log("lhp_run_func func params:",run_func[arr[arr.length-1]],obj)
}
                  return run_func[arr[arr.length-1]](obj)
              }else{
                  return run_func[arr[arr.length-1]]()
              }
          }else{
              if (obj!=null){
                  return window[str_](obj)
              }else{
                  return window[str_]()
              }
          }
          
    }catch(err){if(test){console.log("lhp_run_func err:",err);
}}
  },
    handle_click:async function(event){
      //点击当前 高亮显示
      try{console.log("高亮",this.data.path);
this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
      //显示编辑界面
      try{
        console.log("this.data.tree_data",this.data.tree_data)
        console.log("this.data.tree_data.选择流程_onclick",this.data.tree_data.选择页面_onclick)
        for(let ii=0;ii<this.data.tree_data.选择页面_onclick.length;ii++){
          let ccc=this.data.tree_data.选择页面_onclick[ii];
          /*console.log("cc",ccc,ccc.func)*/
          await lhp_run_func2(ccc.func,this.data.path);
      }
        
      }catch (err){console.log("errrr:",err);
}
        // /* console.log("我点击了一次")*/
        try{
            if(!this.data.tree_data.check_dct[this.data.path]){
                await this.data.刷新目录1();
            }
            /*console.log("?2")*/}
        catch{}

        if (this.data.click){
            try{
                this.data.click(event)
            
                // console.log("start click2")
            }
            catch{}
            return 
        }




        if (this.data.click_obj){
          try{
            this.lhp_run_func(this.data.click_obj.func,this.data.click_obj.args);
          }
          catch{}
          return 
      }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    },
    click1:async function(event,k){
       /* console.log(',,,',this.data.icon_data[k].click)*/
        lhp_run_func(this.data.icon_data[k].click);
        if(!this.data.click_stop){event.stopPropagation();}//阻止父级

    }
},

mounted:function(){
    let tree_data=_this.deepcopy_data.tree_data;
    _this.data.全局配置对象=tree_data['全局配置对象'];
    _this.data.change_name=function(name){
        
        if(!_this.data.page_id){_this.data.page_id=_this.data.path.split(".")[_this.data.path.split(".").length-1]}
    //更新数据 
    
    //更新数据 
    let update_val={
        "type":"change_data",
        "data_type":"set_list",//类型 修改数据
        "postput":[{
            'path':`page_config.dict.1.dict.${_this.data.page_id}.base_info.deepcopy_data`,
            'data':{"name":name}
          },
        
        ],
      }
    //向服务端websocket发送消息
    _this.data.全局配置对象.更新(update_val);
    }
    _this.data.del=function(){
        if(!_this.data.page_id){_this.data.page_id=_this.data.path.split(".")[_this.data.path.split(".").length-1]}
        //更新数据 
        let update_val={
            "type":"change_data",
            "data_type":"set_list",//类型 修改数据
            "delete":[{
                'path':`page_config.dict.1.dict.${_this.data.page_id}`,
              },
            ],
          }
        //向服务端websocket发送消息
        _this.data.全局配置对象.更新(update_val);
        }
_this.data.icon_data={
  89:{
      icon_class:"icon iconfont icon-qianduan",
      hovertext:"预览页面",
      add_show:false,
      click:async function(){
        _this.$confirm('预览的是保存配置后的页面,点击确认开始预览', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
            if(!_this.data.page_id){_this.data.page_id=_this.data.path.split(".")[_this.data.path.split(".").length-1]}
            window.open(window.location.href.replace("home?","show_page?")+`&page_id=${_this.data.page_id}`, '_blank');
        }).catch(() => {
          // 用户点击了取消按钮或关闭了弹窗
          
        });

      }
      },
    90:{
        icon_class:"icon iconfont icon-write",
        hovertext:"修改属性",
        add_show:false,
        click:async function(){
        _this.$prompt('修改名称', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
          }).then(({ value }) => {
            try{_this.data.change_name(value);}
            catch (err){
                console.log("出错..",err)
            }
            
          }).catch(() => {
            _this.$message({
              type: 'info',
              message: '取消输入'
            });       
          });
        }
        },
    100:{
        icon_class:"icon iconfont icon-shanchu",
        hovertext:"删除该页面",
        add_show:false,
        click:async function(){
        
        
            _this.$confirm('此操作将删除, 是否继续?', '提示', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                type: 'warning'
              }).then(() => {
                _this.data.del();
    
              
              }).catch(() => {
                _this.$message({
                  type: 'info',
                  message: '已取消删除'
                });          
              });



        }
        },
}


}

})

Vue.component2('a_1_0_2_32_1', {  
    template: `
        <div  :class="{ 'a_1_0_2_32_1_lines test': data.true, 'a_1_0_2_32_1_lines_onclick': data.onclick_flag }" @click="handle_click" v-show="show_flag">
        <span :style="'padding-left: '+data._space_+'px;'"></span>
        <span  v-if="data.icon1_show_flag":class="{'icon iconfont':data.true,'icon-right':data.close,'icon-down':data.close==false}"></span>
        
        <span  class="a_1_0_2_32_1_hid_line" style="color:#bcbcbc">{{data.name}}</span>
        <div style="display:inline-block;flex:1;">
        <div style="display:flex;
    justify-content: flex-end;
    display: flex;">
    
        <div  @click="click1($event,k)" v-for="(v,k) in data.icon_data"
        :key="k">
         <a_1_0_3_0_0 style="display: inline-block;"
         :deepcopy_data="v"></a_1_0_3_0_0>
        </div>
        </div>
        </div>
        </div>
`,
data(){
    return{
        show_flag:true,
        data:{
            onclick_flag:false,
            tree_data:{},//
            icon_data:{},
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            false:false,
            close:true,
            name:"",
            _space_:0,
        }
    }
},
methods:{
    handle_click:async function(event){
        //点击当前 高亮显示
        try{//console.log("高亮",this.data.path);
this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
        // /* console.log("我点击了一次")*/
        try{
            if(!this.data.tree_data.check_dct[this.data.path]){
                await this.data.刷新目录1();
            }
            /*console.log("?2")*/}
        catch{}

        if (this.data.click){
            try{
                this.data.click(event)
            
                // console.log("start click2")
            }
            catch{}
            return 
        }


        if (this.data.click_obj){
            try{
                lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
            
                // console.log("start click3")
            }
            catch{}
            return 
        }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    },
    click1:async function(event,k){
       /* console.log(',,,',this.data.icon_data[k].click)*/
        lhp_run_func(this.data.icon_data[k].click);
        if(!this.data.click_stop){event.stopPropagation();}//阻止父级

    }
},

mounted:function(){
    /*console.log("210的deepcopydata",_this.deepcopy_data)*/
let tree_data=_this.deepcopy_data.tree_data;
_this.data.全局配置对象=tree_data['全局配置对象'];
_this.data.add_new=function(name){
    
//更新数据 

//更新数据 
let update_val={
    "type":"change_data",
    "data_type":"set_list",//类型 修改数据
    update_params:[
      {//将路径为path的数据 进行 +1操作 并且存入属性add中 提供给data里面携带@add的属性调用
        name:'@index',
        path:`flow_chat_config.dict.1.base_info.index`,//数据路径
        use:'++s'
      },
    ],
    "postput":[{
        'path':`flow_chat_config.dict.1.dict.@index`,
        'data':{
            "base_info":{
                "process_idx":0,//进程id
                "index":0,//拖拽进组件的id
                "process_dct":{},//存储进程id所属
                "deepcopy_data":{"name":name},"vue_name":"a_1_0_2_7_1","width":"2000px","height":"2000px","scale":"100"},
            "flow_dict":{},//存放当前正在处理的组件
            "dict":{}
        }
      },
      {
        'path':`flow_chat_config.dict.1.base_info`,
        'data':{
            "index":"@index",
        }
      },
    
    ],
  }
//向服务端websocket发送消息
_this.data.全局配置对象.更新(update_val);
}


_this.data.icon_data={
    100:{
        icon_class:"icon iconfont icon-upload",
        hovertext:"上传新静态文件",
        click:async function(){
        _this.$prompt('输入新建流程名称', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
          }).then(({ value }) => {
            try{_this.data.add_new(value);}
            catch (err){
                console.log("出错..",err)
            }
            
          }).catch(() => {
            _this.$message({
              type: 'info',
              message: '取消输入'
            });       
          });
        }
        },
}


}

})

Vue.component2('a_1_0_2_33_1', {  
    template: `
        <div  :class="{ 'a_1_0_2_33_1_lines test': data.true, 'a_1_0_2_33_1_lines_onclick': data.onclick_flag }" @click="handle_click" v-show="show_flag">
        <span :style="'padding-left: '+data._space_+'px;'"></span>
        <span  v-if="data.icon1_show_flag":class="{'icon iconfont':data.true,'icon-right':data.close,'icon-down':data.close==false}"></span>
        
        <span  class="a_1_0_2_33_1_hid_line" style="color:#bcbcbc">{{data.name}}</span>
        <div style="display:inline-block;flex:1;">
        <div style="display:flex;
    justify-content: flex-end;
    display: flex;">
    
        <div  @click="click1($event,k)" v-for="(v,k) in data.icon_data"
        :key="k">
         <a_1_0_3_0_0 style="display: inline-block;"
         :deepcopy_data="v"></a_1_0_3_0_0>
        </div>
        </div>
        </div>
        </div>
`,
data(){
    return{
        show_flag:true,
        data:{
            onclick_flag:false,
            tree_data:{},//
            icon_data:{},
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            false:false,
            close:true,
            name:"",
            _space_:0,
        }
    }
},
methods:{
    handle_click:async function(event){
        //点击当前 高亮显示
        try{//console.log("高亮",this.data.path);
this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
        // /* console.log("我点击了一次")*/
        try{
            if(!this.data.tree_data.check_dct[this.data.path]){
                await this.data.刷新目录1();
            }
            /*console.log("?2")*/}
        catch{}

        if (this.data.click){
            try{
                this.data.click(event)
            
                // console.log("start click2")
            }
            catch{}
            return 
        }


        if (this.data.click_obj){
            try{
                lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
            
                // console.log("start click3")
            }
            catch{}
            return 
        }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    },
    click1:async function(event,k){
       /* console.log(',,,',this.data.icon_data[k].click)*/
        lhp_run_func(this.data.icon_data[k].click);
        if(!this.data.click_stop){event.stopPropagation();}//阻止父级

    }
},

mounted:function(){
    /*console.log("210的deepcopydata",_this.deepcopy_data)*/
let tree_data=_this.deepcopy_data.tree_data;
_this.data.全局配置对象=tree_data['全局配置对象'];
_this.data.add_new=function(name){
    
//更新数据 

//更新数据 
let update_val={
    "type":"change_data",
    "data_type":"set_list",//类型 修改数据
    update_params:[
      {//将路径为path的数据 进行 +1操作 并且存入属性add中 提供给data里面携带@add的属性调用
        name:'@index',
        path:`flow_chat_config.dict.1.base_info.index`,//数据路径
        use:'++s'
      },
    ],
    "postput":[{
        'path':`flow_chat_config.dict.1.dict.@index`,
        'data':{
            "base_info":{
                "process_idx":0,//进程id
                "index":0,//拖拽进组件的id
                "process_dct":{},//存储进程id所属
                "deepcopy_data":{"name":name},"vue_name":"a_1_0_2_7_1","width":"2000px","height":"2000px","scale":"100"},
            "flow_dict":{},//存放当前正在处理的组件
            "dict":{}
        }
      },
      {
        'path':`flow_chat_config.dict.1.base_info`,
        'data':{
            "index":"@index",
        }
      },
    
    ],
  }
//向服务端websocket发送消息
_this.data.全局配置对象.更新(update_val);
}


_this.data.icon_data={
    100:{
        icon_class:"icon iconfont icon-upload",
        hovertext:"上传新静态文件",
        click:async function(){
        _this.$prompt('输入新建流程名称', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
          }).then(({ value }) => {
            try{_this.data.add_new(value);}
            catch (err){
                console.log("出错..",err)
            }
            
          }).catch(() => {
            _this.$message({
              type: 'info',
              message: '取消输入'
            });       
          });
        }
        },
}


}

})

Vue.component2('a_1_0_2_34_1', {  
    template: `
        <div  :class="{ 'a_1_0_2_34_1_lines test': data.true, 'a_1_0_2_34_1_lines_onclick': data.onclick_flag }" @click="handle_click" v-show="show_flag">
        <span :style="'padding-left: '+data._space_+'px;'"></span>
        <span  v-if="data.icon1_show_flag":class="{'icon iconfont':data.true,'icon-right':data.close,'icon-down':data.close==false}"></span>
        
        <span  class="a_1_0_2_34_1_hid_line" style="color:#bcbcbc">{{data.name}}</span>
        <div style="display:inline-block;flex:1;">
        <div style="display:flex;
    justify-content: flex-end;
    display: flex;">
    
        <div  @click="click1($event,k)" v-for="(v,k) in data.icon_data"
        :key="k">
         <a_1_0_3_0_0 style="display: inline-block;"
         :deepcopy_data="v"></a_1_0_3_0_0>
        </div>
        </div>
        </div>
        </div>
`,
data(){
    return{
        show_flag:true,
        data:{
            onclick_flag:false,
            tree_data:{},//
            icon_data:{},
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            false:false,
            close:true,
            name:"",
            _space_:0,
        }
    }
},
methods:{
    handle_click:async function(event){
        //点击当前 高亮显示
        try{//console.log("高亮",this.data.path);
this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
        
      //显示编辑界面
      try{
        console.log("this.data.tree_data.选择页面_onclick",this.data.tree_data.选择页面_onclick)
        for(let ii=0;ii<this.data.tree_data.选择页面_onclick.length;ii++){
          let ccc=this.data.tree_data.选择页面_onclick[ii];
          /*console.log("cc",ccc,ccc.func)*/
          await lhp_run_func2(ccc.func,this.data.path);
      }
        
      }catch (err){console.log("errrr:",err);
}
        // /* console.log("我点击了一次")*/
        try{
            if(!this.data.tree_data.check_dct[this.data.path]){
                await this.data.刷新目录1();
            }
            /*console.log("?2")*/}
        catch{}

        if (this.data.click){
            try{
                this.data.click(event)
            
                // console.log("start click2")
            }
            catch{}
            return 
        }


        if (this.data.click_obj){
            try{
                lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
            
                // console.log("start click3")
            }
            catch{}
            return 
        }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    },
    click1:async function(event,k){
       /* console.log(',,,',this.data.icon_data[k].click)*/
        lhp_run_func(this.data.icon_data[k].click);
        if(!this.data.click_stop){event.stopPropagation();}//阻止父级

    }
},

mounted:function(){
    /*console.log("210的deepcopydata",_this.deepcopy_data)*/
let tree_data=_this.deepcopy_data.tree_data;
_this.data.全局配置对象=tree_data['全局配置对象'];
_this.data.add_new=function(name){
    
//更新数据 

//更新数据 
let update_val={
    "type":"change_data",
    "data_type":"set_list",//类型 修改数据
    update_params:[
      {//将路径为path的数据 进行 +1操作 并且存入属性add中 提供给data里面携带@add的属性调用
        name:'@index',
        path:`flow_chat_config.dict.1.base_info.index`,//数据路径
        use:'++s'
      },
    ],
    "postput":[{
        'path':`flow_chat_config.dict.1.dict.@index`,
        'data':{
            "base_info":{
                "process_idx":0,//进程id
                "index":0,//拖拽进组件的id
                "process_dct":{},//存储进程id所属
                "deepcopy_data":{"name":name},"vue_name":"a_1_0_2_7_1","width":"2000px","height":"2000px","scale":"100"},
            "flow_dict":{},//存放当前正在处理的组件
            "dict":{}
        }
      },
      {
        'path':`flow_chat_config.dict.1.base_info`,
        'data':{
            "index":"@index",
        }
      },
    
    ],
  }
//向服务端websocket发送消息
_this.data.全局配置对象.更新(update_val);
}


_this.data.icon_data={
    // 100:{
    //     icon_class:"icon iconfont icon-houduan",
    //     hovertext:"添加新流程",
    //     click:async function(){
    //     _this.$prompt('输入新建流程名称', '提示', {
    //         confirmButtonText: '确定',
    //         cancelButtonText: '取消',
    //       }).then(({ value }) => {
    //         try{_this.data.add_new(value);}
    //         catch (err){
    //             console.log("出错..",err)
    //         }
            
    //       }).catch(() => {
    //         _this.$message({
    //           type: 'info',
    //           message: '取消输入'
    //         });       
    //       });
    //     }
    //     },
}


}

})

Vue.component2('a_1_0_2_35_1', {  
    template: `
        <div  :class="{ 'a_1_0_2_35_1_lines test': data.true, 'a_1_0_2_35_1_lines_onclick': data.onclick_flag }" @click="handle_click" v-show="show_flag">
        <span :style="'padding-left: '+data._space_+'px;'"></span>
        <span  v-if="data.icon1_show_flag":class="{'icon iconfont':data.true,'icon-right':data.close,'icon-down':data.close==false}"></span>
        
        <span  class="a_1_0_2_35_1_hid_line" style="color:#bcbcbc">{{data.name}}【{{data.version}}】</span>
        <div style="display:inline-block;flex:1;">
        <div style="display:flex;
    justify-content: flex-end;
    display: flex;">
    
        <div  @click="click1($event,k)" v-for="(v,k) in data.icon_data"
        :key="k">
         <a_1_0_3_0_0 style="display: inline-block;"
         :deepcopy_data="v"></a_1_0_3_0_0>
        </div>
        </div>
        </div>
        </div>
`,
data(){
    return{
        show_flag:true,
        data:{
            onclick_flag:false,
            tree_data:{},//
            icon_data:{},
            version:"1",
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            false:false,
            close:true,
            name:"",
            _space_:0,
        }
    }
},
methods:{
    handle_click:async function(event){
        //点击当前 高亮显示
        try{//console.log("高亮",this.data.path);
this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
        // /* console.log("我点击了一次")*/
        try{
            if(!this.data.tree_data.check_dct[this.data.path]){
                await this.data.刷新目录1();
            }
            /*console.log("?2")*/}
        catch{}

        if (this.data.click){
            try{
                this.data.click(event)
            
                // console.log("start click2")
            }
            catch{}
            return 
        }


        if (this.data.click_obj){
            try{
                lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
            
                // console.log("start click3")
            }
            catch{}
            return 
        }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    },
    click1:async function(event,k){
       /* console.log(',,,',this.data.icon_data[k].click)*/
        lhp_run_func(this.data.icon_data[k].click);
        if(!this.data.click_stop){event.stopPropagation();}//阻止父级

    }
},

mounted:function(){
    /*console.log("210的deepcopydata",_this.deepcopy_data)*/
let tree_data=_this.deepcopy_data.tree_data;
_this.data.全局配置对象=tree_data['全局配置对象'];
_this.data.add_new=function(name){
    
//更新数据 

//更新数据 
let update_val={
    "type":"change_data",
    "data_type":"set_list",//类型 修改数据
    update_params:[
      {//将路径为path的数据 进行 +1操作 并且存入属性add中 提供给data里面携带@add的属性调用
        name:'@index',
        path:`flow_chat_config.dict.1.base_info.index`,//数据路径
        use:'++s'
      },
    ],
    "postput":[{
        'path':`flow_chat_config.dict.1.dict.@index`,
        'data':{
            "base_info":{
                "process_idx":0,//进程id
                "index":0,//拖拽进组件的id
                "process_dct":{},//存储进程id所属
                "deepcopy_data":{"name":name},"vue_name":"a_1_0_2_7_1","width":"2000px","height":"2000px","scale":"100"},
            "flow_dict":{},//存放当前正在处理的组件
            "dict":{}
        }
      },
      {
        'path':`flow_chat_config.dict.1.base_info`,
        'data':{
            "index":"@index",
        }
      },
    
    ],
  }
//向服务端websocket发送消息
_this.data.全局配置对象.更新(update_val);
}


_this.data.icon_data={
    // 100:{
    //     icon_class:"icon iconfont icon-houduan",
    //     hovertext:"添加新流程",
    //     click:async function(){
    //     _this.$prompt('输入新建流程名称', '提示', {
    //         confirmButtonText: '确定',
    //         cancelButtonText: '取消',
    //       }).then(({ value }) => {
    //         try{_this.data.add_new(value);}
    //         catch (err){
    //             console.log("出错..",err)
    //         }
            
    //       }).catch(() => {
    //         _this.$message({
    //           type: 'info',
    //           message: '取消输入'
    //         });       
    //       });
    //     }
    //     },
}


}

})

Vue.component2('a_1_0_2_36_1', {  
    template: `
        <div  :class="{ 'a_1_0_2_36_1_lines test': data.true, 'a_1_0_2_36_1_lines_onclick': data.onclick_flag }" @click="handle_click" v-show="show_flag">
        <span :style="'padding-left: '+data._space_+'px;'"></span>
        <span  v-if="data.icon1_show_flag" class="icon iconfont icon-html"></span>
        
        <span  class="a_1_0_2_36_1_hid_line" style="color:#bcbcbc">{{data.name}}</span>
        <div style="display:inline-block;flex:1;">
        <div style="display:flex;
    justify-content: flex-end;
    display: flex;">
    
        <div  @click="click1($event,k)" v-for="(v,k) in data.icon_data"
        :key="k">
         <a_1_0_3_0_0 style="display: inline-block;"
         :deepcopy_data="v"></a_1_0_3_0_0>
        </div>
        </div>
        </div>
        </div>
`,
data(){
    return{
        show_flag:true,
        data:{
            onclick_flag:false,
            tree_data:{},//
            icon_data:{},
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            false:false,
            close:true,
            name:"",
            _space_:0,
        }
    }
},
methods:{
    handle_click:async function(event){
        //点击当前 高亮显示
        try{//console.log("高亮",this.data.path);
this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
        // /* console.log("我点击了一次")*/
        try{
            if(!this.data.tree_data.check_dct[this.data.path]){
                await this.data.刷新目录1();
            }
            /*console.log("?2")*/}
        catch{}

        if (this.data.click){
            try{
                this.data.click(event)
            
                // console.log("start click2")
            }
            catch{}
            return 
        }


        if (this.data.click_obj){
            try{
                lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
            
                // console.log("start click3")
            }
            catch{}
            return 
        }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    },
    click1:async function(event,k){
       /* console.log(',,,',this.data.icon_data[k].click)*/
        lhp_run_func(this.data.icon_data[k].click);
        if(!this.data.click_stop){event.stopPropagation();}//阻止父级

    }
},

mounted:function(){
    /*console.log("210的deepcopydata",_this.deepcopy_data)*/
let tree_data=_this.deepcopy_data.tree_data;
_this.data.全局配置对象=tree_data['全局配置对象'];
_this.data.add_new=function(name){
    
//更新数据 

//更新数据 
let update_val={
    "type":"change_data",
    "data_type":"set_list",//类型 修改数据
    update_params:[
      {//将路径为path的数据 进行 +1操作 并且存入属性add中 提供给data里面携带@add的属性调用
        name:'@index',
        path:`flow_chat_config.dict.1.base_info.index`,//数据路径
        use:'++s'
      },
    ],
    "postput":[{
        'path':`flow_chat_config.dict.1.dict.@index`,
        'data':{
            "base_info":{
                "process_idx":0,//进程id
                "index":0,//拖拽进组件的id
                "process_dct":{},//存储进程id所属
                "deepcopy_data":{"name":name},"vue_name":"a_1_0_2_7_1","width":"2000px","height":"2000px","scale":"100"},
            "flow_dict":{},//存放当前正在处理的组件
            "dict":{}
        }
      },
      {
        'path':`flow_chat_config.dict.1.base_info`,
        'data':{
            "index":"@index",
        }
      },
    
    ],
  }
//向服务端websocket发送消息
_this.data.全局配置对象.更新(update_val);
}


_this.data.icon_data={
    // 100:{
    //     icon_class:"icon iconfont icon-houduan",
    //     hovertext:"添加新流程",
    //     click:async function(){
    //     _this.$prompt('输入新建流程名称', '提示', {
    //         confirmButtonText: '确定',
    //         cancelButtonText: '取消',
    //       }).then(({ value }) => {
    //         try{_this.data.add_new(value);}
    //         catch (err){
    //             console.log("出错..",err)
    //         }
            
    //       }).catch(() => {
    //         _this.$message({
    //           type: 'info',
    //           message: '取消输入'
    //         });       
    //       });
    //     }
    //     },
}


}

})

Vue.component2('a_1_0_2_4_0', {  
    template: `
        <div  :class="{ 'a_1_0_2_4_0_lines test': data.true, 'a_1_0_2_4_0_lines_onclick': data.onclick_flag }" @click="handle_click" v-show="show_flag">
        <span :style="'padding-left: '+data._space_+'px;'"></span>
        <span  v-if="data.icon1_show_flag":class="{'icon iconfont':data.true,'icon-right':data.close,'icon-down':data.close==false}"></span>
        
        <span  class="a_1_0_2_4_1_hid_line" style="color:#bcbcbc">{{data.name}}</span>
        <div style="display:inline-block;flex:1;">
        <div style="display:flex;
    justify-content: flex-end;
    display: flex;">
    
        <div  @click="click1($event,k)" v-for="(v,k) in data.icon_data"
        :key="k">
         <a_1_0_3_0_0 style="display: inline-block;"
         :deepcopy_data="v"></a_1_0_3_0_0>
        </div>
        </div>
        </div>
        </div>
`,
data(){
    return{
        show_flag:true,
        data:{
            onclick_flag:false,
            tree_data:{},//
            icon_data:{},
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            false:false,
            close:true,
            name:"",
            _space_:0,
        }
    }
},
methods:{

    handle_click:async function(event){
        //点击当前 高亮显示
        try{//console.log("高亮",this.data.path);
this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
        /* console.log("我点击了一次")*/
        try{
            /* console.log("?")*/
            if(!this.data.tree_data.check_dct[this.data.path]){
                await this.data.刷新前端组件();
            }
            /*console.log("?2")*/}
        catch{}

        if (this.data.click){
            try{
                this.data.click(event)
            
                // console.log("start click2")
            }
            catch{}
            return 
        }


        if (this.data.click_obj){
            try{
                lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
            
                // console.log("start click3")
            }
            catch{}
            return 
        }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    },
    click1:async function(event,k){
       /* console.log(',,,',this.data.icon_data[k].click)*/
        lhp_run_func(this.data.icon_data[k].click);
        if(!this.data.click_stop){event.stopPropagation();}//阻止父级

    }
},

mounted:function(){
    /*console.log("210的deepcopydata",_this.deepcopy_data)*/
    let urls=_this.deepcopy_data.tree_data.url;
    let check_dct=_this.deepcopy_data.tree_data.check_dct;
//   获取用户的前端组件库组件版本列表_url:'/get_ui_dir1',
//   获取用户的前端组件库组件版本列表_url:'/get_ui_dir2',
//   获取用户的前端组件库组件版本列表_url:'/get_ui_temp',
//   获取用户的前端组件库组件版本列表_url:'/get_ui_version',
//   添加前端组件版本_url:'/add_ui_dir1',
//   添加前端组件版本_url:'/add_ui_dir2',
//   添加前端组件版本_url:'/add_ui_temp',
//   添加前端组件版本版本_url:'/add_ui_version',
//   更新前端组件版本_url:'/update_ui_version',
//   修改前端组件属性_url:'/change_ui_dir1'
//   修改前端组件属性_url:'/change_ui_dir2'
//   修改前端组件属性_url:'/change_ui_temp'



//   获取用户的后端组件库目录2列表_url:'/get_flow_dir1',
//   获取用户的后端组件库目录2列表_url:'/get_flow_dir2',
//   获取用户的后端组件库组件列表_url:'/get_flow_temp',
//   获取用户的后端组件库组件版本列表_url:'/get_ui_version',
//   添加后端目录2_url:'/add_flow_dir1',
//   添加后端目录2_url:'/add_flow_dir2',
//   添加后端组件_url:'/add_flow_temp',
//   添加后端组件版本_url:'/add_flow_version',
//   更新后端组件版本_url:'/update_flow_version',
_this.data.获取用户的前端组件库组件版本列表_flag=false;
_this.data.获取用户的前端组件库组件版本列表_request=request______({method:'post',url:urls.获取用户的前端组件库组件版本列表_url});
_this.data.获取用户的前端组件库组件版本列表_recv=function(received_data){
    /*console.log("接收数据",received_data,_this.data.path);*/
    _this.data.tree_data.set_dict(received_data.data,_this.data.path);
    check_dct[_this.data.path]=received_data;
    _this.data.获取用户的前端组件库组件版本列表_flag=true;
}
_this.data.刷新前端组件=async function(){

    if(!_this.data.dir1_id){
        let path_l=_this.data.path.split(".");
        _this.data.dir1_id=path_l[path_l.length-3];
        _this.data.dir2_id=path_l[path_l.length-2];
        _this.data.temp_id=path_l[path_l.length-1];
    }
    let count=0;
    _this.data.获取用户的前端组件库组件版本列表_flag=false;
    _this.data.获取用户的前端组件库组件版本列表_request({
        body_data:{dir1_id:_this.data.dir1_id,dir2_id:_this.data.dir2_id,temp_id:_this.data.temp_id},
        execute_lst:[
                      {
                        'type':'func',
                        'func':_this.data.获取用户的前端组件库组件版本列表_recv,
                        'args':['received_data'],
                      },
                    ]
    });
    await time_sleep(20);
    while(1){
        count++;
        await time_sleep(1);
        if(_this.data.获取用户的前端组件库组件版本列表_flag==true){break}
        if(count>500){Vue.prototype.$notify({type: 'error',message: '获取前端目录2列表失败'});break}
    }
}



_this.data.添加前端组件版本_request=request______({method:'post',url:urls.添加前端组件版本_url});

_this.data.添加前端组件版本_recv=function(received_data){
    console.log("接收数据",received_data);
    _this.data.tree_data.set_dict(received_data,_this.data.path);
    _this.data.添加前端组件版本_flag=true;
}
_this.data.添加前端组件版本=async function(name){
    if(!_this.data.dir1_id){
        let path_l=_this.data.path.split(".");
        _this.data.dir1_id=path_l[path_l.length-3];
        _this.data.dir2_id=path_l[path_l.length-2];
        _this.data.temp_id=path_l[path_l.length-1];
    }
    let count=0;
    _this.data.添加前端组件版本_flag=false;
    _this.data.添加前端组件版本_request({
        body_data:{version_name:name,dir1_id:_this.data.dir1_id,dir2_id:_this.data.dir2_id,temp_id:_this.data.temp_id},
        execute_lst:[
                      {
                        'type':'func',
                        'func':_this.data.添加前端组件版本_recv,
                        'args':['received_data'],
                      },
                    ]
    });
    await time_sleep(20);
    while(1){
        count++;
        await time_sleep(1);
        if(_this.data.添加前端组件版本_flag==true){break}
        if(count>500){Vue.prototype.$notify({type: 'error',message: '添加前端组件版本失败'});break}
    }
}




_this.data.修改前端组件属性_request=request______({method:'post',url:urls.修改前端组件属性_url});

findKeydeepcopy=function (obj, path = []){
    // 遍历对象的所有属性  
    for (let key in obj) {  
        if (obj.hasOwnProperty(key)) {  
            // 更新当前路径  
            let currentPath = [...path, key];  
  
            // 如果当前属性的 key 是 'aaa'，返回路径  
            if (key === 'deepcopy_data') {  
                return currentPath;  
            }  
  
            // 如果当前属性是对象，递归调用  
            if (typeof obj[key] === 'object' && obj[key] !== null) {  
                let result = findKeydeepcopy(obj[key], currentPath);  
                if (result) {  
                    return result;  
                }  
            }  
        }  
    }  
  
    // 如果没有找到 key 为 'aaa' 的对象，返回 null  
    return null;  
}  
_this.data.修改前端组件属性_recv=function(received_data){
    console.log("接收数据",received_data);
    _this.data.修改前端组件属性_flag=true;
    let lst=findKeydeepcopy(received_data);
    let copy_data=received_data;
    for(let i=0;i<lst.length;i++){copy_data=copy_data[lst[i]]}
    _this.data.tree_data.change_deepcopy_data(_this.data.path,copy_data);
}
_this.data.修改前端组件属性=async function(name){

    if(!_this.data.dir1_id){
        let path_l=_this.data.path.split(".");
        _this.data.dir1_id=path_l[path_l.length-3];
        _this.data.dir2_id=path_l[path_l.length-2];
        _this.data.temp_id=path_l[path_l.length-1];
    }
    let count=0;
    _this.data.修改前端组件属性_flag=false;
    _this.data.修改前端组件属性_request({
        body_data:{name:name,dir1_id:_this.data.dir1_id,dir2_id:_this.data.dir2_id,temp_id:_this.data.temp_id},
        execute_lst:[
                      {
                        'type':'func',
                        'func':_this.data.修改前端组件属性_recv,
                        'args':['received_data'],
                      },
                    ]
    });
    await time_sleep(20);
    while(1){
        count++;
        await time_sleep(1);
        if(_this.data.修改前端组件属性_flag==true){break}
        if(count>500){Vue.prototype.$notify({type: 'error',message: '修改前端组件属性失败'});break}
    }
}


_this.data.icon_data={
    0:{
        icon_class:"icon iconfont icon-write",
        hovertext:"修改前端组件属性",
        add_show:false,
        click:async function(){
            _this.$prompt('修改前端组件(名称)', '提示', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
              }).then(({ value }) => {
               _this.data.修改前端组件属性(value);
              }).catch(() => {
                _this.$message({
                  type: 'info',
                  message: '取消输入'
                });       
              });},
        },
    1:{
        icon_class:"icon iconfont icon-refresh",
        hovertext:"刷新前端组件版本列表",
        add_show:false,
        click:async function(){
            /*console.log("开始刷新目录");*/
            _this.data.刷新前端组件();
        }
        },
    2:{

    icon_class:"icon iconfont icon-add_version",
    hovertext:"添加前端组件版本",
    click:async function(){
        _this.$prompt('添加前端组件版本版本(名称)', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
          }).then(({ value }) => {
           _this.data.添加前端组件版本(value);
          }).catch(() => {
            _this.$message({
              type: 'info',
              message: '取消输入'
            });       
          });},
    },
}


}

})

Vue.component2('a_1_0_2_5_0', {  
    template: `
        <div  :class="{ 'a_1_0_2_5_0_lines test': data.true, 'a_1_0_2_5_0_lines_onclick': data.onclick_flag }" @click="handle_click" v-show="show_flag">
        <span :style="'padding-left: '+data._space_+'px;'"></span>
        <span  v-if="data.icon1_show_flag" class="icon iconfont icon-add_version"></span>
        
        <span  class="a_1_0_2_5_1_hid_line" style="color:#bcbcbc">{{data.version}}.{{data.version_name}}</span>
        <div style="display:inline-block;flex:1;">
        <div style="display:flex;
    justify-content: flex-end;
    display: flex;">
    
        <div  @click="click1($event,k)" v-for="(v,k) in data.icon_data"
        :key="k">
         <a_1_0_3_0_0 style="display: inline-block;"
         :deepcopy_data="v"></a_1_0_3_0_0>
        </div>
        </div>
        </div>


        <el-dialog
        title="更新代码(上传组件文件夹)"
        :visible.sync="update_my_temp_from_flag"
        width="30%">
        <input ref="add_temp" type="file" webkitdirectory directory multiple>
        <span slot="footer" class="dialog-footer">
          <el-button @click="update_my_temp_from_flag = false">取消</el-button>
          <el-button @click="update">确 定</el-button>
        </span>
      </el-dialog>


















        </div>
`,
data(){
    return{
        update_my_temp_from_flag:false,
        show_flag:true,
        data:{
          version_name:'',
          version:"",
          onclick_flag:false,
            tree_data:{},//
            icon_data:{},
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            false:false,
            close:true,
            name:"",
            _space_:0,
        }
    }
},
methods:{

    update:function(){this.data.update_temp()},
    handle_click:async function(event){
      //点击当前 高亮显示
      try{console.log("高亮",this.data.path);
this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
        return
        /* console.log("我点击了一次")*/
        try{
            /* console.log("?")*/
            if(!this.data.tree_data.check_dct[this.data.path]){
                await this.data.刷新前端组件();
            }
            /*console.log("?2")*/}
        catch{}

        if (this.data.click){
            try{
                this.data.click(event)
            
                // console.log("start click2")
            }
            catch{}
            return 
        }


        if (this.data.click_obj){
            try{
                lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
            
                // console.log("start click3")
            }
            catch{}
            return 
        }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    },
    click1:async function(event,k){
       /* console.log(',,,',this.data.icon_data[k].click)*/
        lhp_run_func(this.data.icon_data[k].click);
        if(!this.data.click_stop){event.stopPropagation();}//阻止父级

    }
},

mounted:function(){
    /*console.log("210的deepcopydata",_this.deepcopy_data)*/
    let urls=_this.deepcopy_data.tree_data.url;
    let check_dct=_this.deepcopy_data.tree_data.check_dct;
_this.data.获取用户的前端组件库组件版本列表_flag=false;
_this.data.获取用户的前端组件库组件版本列表_request=request______({method:'post',url:urls.获取用户的前端组件库组件版本列表_url});
_this.data.获取用户的前端组件库组件版本列表_recv=function(received_data){
    /*console.log("接收数据",received_data,_this.data.path);*/
    _this.data.tree_data.set_dict(received_data.data,_this.data.path);
    check_dct[_this.data.path]=received_data;
    _this.data.获取用户的前端组件库组件版本列表_flag=true;
}
_this.data.刷新前端组件=async function(){

    if(!_this.data.dir1_id){
        let path_l=_this.data.path.split(".");
        _this.data.dir1_id=path_l[path_l.length-3];
        _this.data.dir2_id=path_l[path_l.length-2];
        _this.data.temp_id=path_l[path_l.length-1];
    }
    let count=0;
    _this.data.获取用户的前端组件库组件版本列表_flag=false;
    _this.data.获取用户的前端组件库组件版本列表_request({
        body_data:{dir1_id:_this.data.dir1_id,dir2_id:_this.data.dir2_id,temp_id:_this.data.temp_id,version_id:_this.data.version_id},
        execute_lst:[
                      {
                        'type':'func',
                        'func':_this.data.获取用户的前端组件库组件版本列表_recv,
                        'args':['received_data'],
                      },
                    ]
    });
    await time_sleep(20);
    while(1){
        count++;
        await time_sleep(1);
        if(_this.data.获取用户的前端组件库组件版本列表_flag==true){break}
        if(count>500){Vue.prototype.$notify({type: 'error',message: '获取前端目录2列表失败'});break}
    }
}






_this.data.修改前端组件版本属性_request=request______({method:'post',url:urls.修改前端组件版本属性_url});

findKeydeepcopy=function (obj, path = []){
  // 遍历对象的所有属性  
  for (let key in obj) {  
      if (obj.hasOwnProperty(key)) {  
          // 更新当前路径  
          let currentPath = [...path, key];  

          // 如果当前属性的 key 是 'aaa'，返回路径  
          if (key === 'deepcopy_data') {  
              return currentPath;  
          }  

          // 如果当前属性是对象，递归调用  
          if (typeof obj[key] === 'object' && obj[key] !== null) {  
              let result = findKeydeepcopy(obj[key], currentPath);  
              if (result) {  
                  return result;  
              }  
          }  
      }  
  }  

  // 如果没有找到 key 为 'aaa' 的对象，返回 null  
  return null;  
}  
_this.data.修改前端组件版本属性_recv=function(received_data){
    console.log("接收数据",received_data);
    _this.data.修改前端组件版本属性_flag=true;
    let lst=findKeydeepcopy(received_data);
    let copy_data=received_data;
    for(let i=0;i<lst.length;i++){copy_data=copy_data[lst[i]]}
    _this.data.tree_data.change_deepcopy_data(_this.data.path,copy_data);
}
_this.data.修改前端组件版本属性=async function(name){

    if(!_this.data.dir1_id){
        let path_l=_this.data.path.split(".");
        _this.data.dir1_id=path_l[path_l.length-4];
        _this.data.dir2_id=path_l[path_l.length-3];
        _this.data.temp_id=path_l[path_l.length-2];
        _this.data.version_id=path_l[path_l.length-1];
    }
    let count=0;
    _this.data.修改前端组件版本属性_flag=false;
    _this.data.修改前端组件版本属性_request({
        body_data:{name:name,dir1_id:_this.data.dir1_id,dir2_id:_this.data.dir2_id,temp_id:_this.data.temp_id,version_id:_this.data.version_id},
        execute_lst:[
                      {
                        'type':'func',
                        'func':_this.data.修改前端组件版本属性_recv,
                        'args':['received_data'],
                      },
                    ]
    });
    await time_sleep(20);
    while(1){
        count++;
        await time_sleep(1);
        if(_this.data.修改前端组件版本属性_flag==true){break}
        if(count>500){Vue.prototype.$notify({type: 'error',message: '修改前端组件版本属性失败'});break}
    }
}
//生成随机数
_this.data.generateRandomString=function (length){  
  if (_this.data.generateRandomString_val){
    return _this.data.generateRandomString_val
  }
  const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';  
  let result = '';  
  const charactersLength = characters.length;  
  for (let i = 0; i < length; i++) {  
      const randomIndex = Math.floor(Math.random() * charactersLength);  
      result += characters[randomIndex];  
  }  
  _this.data.generateRandomString_val=result
  return result;  
}  
_this.data.icon_data={
  297:{
    icon_class:"icon iconfont icon-fuzhi",
    hovertext:"复制组件id",
    add_show:false,
    click:async function(){
      if(!_this.data.dir1_id){
        let path_l=_this.data.path.split(".");
        _this.data.dir1_id=path_l[path_l.length-4];
        _this.data.dir2_id=path_l[path_l.length-3];
        _this.data.temp_id=path_l[path_l.length-2];
        _this.data.version_id=path_l[path_l.length-1];
    }
    let copy_data=`a_${cookie_read("easyedit_userid")}_${_this.data.dir1_id}_${_this.data.dir2_id}_${_this.data.temp_id}_${_this.data.version_id}`
      copy_text(copy_data); 
      Vue.prototype.$notify({type: 'success',message: '已拷贝:'+copy_data})

  },
},
  
  298:{
    icon_class:"icon iconfont icon-write",
    hovertext:"修改前端组件版本属性",
    add_show:false,
    click:async function(){
        _this.$prompt('修改前端组件(名称)', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
          }).then(({ value }) => {
           _this.data.修改前端组件版本属性(value);
          }).catch(() => {
            _this.$message({
              type: 'info',
              message: '取消输入'
            });       
          });},
    },
  299:{
      icon_class:"icon iconfont icon-download",
      hovertext:"下载此组件代码",
      add_show:false,
      click:async function(){
        
    if(!_this.data.dir1_id){
      let path_l=_this.data.path.split(".");
      _this.data.dir1_id=path_l[path_l.length-4];
      _this.data.dir2_id=path_l[path_l.length-3];
      _this.data.temp_id=path_l[path_l.length-2];
      _this.data.version_id=path_l[path_l.length-1];
  }
    
        response4 = await fetch(urls.下载用户的前端组件库组件版本_url, {  
          method: 'POST', // 指定请求方法为 POST  
          headers: {  
            'Content-Type': 'application/json', // 设置请求头，表明发送的是 JSON 数据  
            // 可能还需要设置其他请求头，比如 'Authorization' 用于身份验证  
          },  
          body: JSON.stringify({"down_user_id":cookie_read("easyedit_userid"),"dir1_id":_this.data.dir1_id,"dir2_id":_this.data.dir2_id,"temp_id":_this.data.temp_id,"version_id":_this.data.version_id,"request_id":_this.data.generateRandomString(10)}), // 将 JSON 字符串作为请求体发送  
        });  
          data4 = await response4.json();
          if(data4.type=='wait'){

            Vue.prototype.$notify({type: 'info',message: '下载人数过多，当前排队:'+data4.num})
          }else{
            window.location.href =data4.down_url;
          }
          
          },
      },
    // 2:{
    //     icon_class:"icon iconfont icon-refresh",
    //     hovertext:"刷新前端组件版本列表",
    //     add_show:false,
    //     click:async function(){
    //         /*console.log("开始刷新目录");*/
    //         _this.data.刷新前端组件();
    //     }
    //     },
    300:{

    icon_class:"icon iconfont icon-upload",
    hovertext:"更新代码",
    add_show:false,
    click:async function(){
        // console.log("update_my_temp_from_flag",_this.update_my_temp_from_flag)
    //初始化上传文件夹回调函数
    if(!_this.eeeeeeeeeess){
        // console.log("开始初始化")
      ttime3(_this,"add_temp",function(){
        // console.log("...>?")
          _this.$refs.add_temp.addEventListener('change', function(event) {  
            // 在这里执行你的函数  
            // console.log("_this.files","event.target.files)
            _this.files=event.target.files; 
            // console.log("_this.files",_this.files)
            if(!_this.data.dir1_id){
                let path_l=_this.data.path.split(".");
                _this.data.dir1_id=path_l[path_l.length-4];
                _this.data.dir2_id=path_l[path_l.length-3];
                _this.data.temp_id=path_l[path_l.length-2];
                _this.data.version_id=path_l[path_l.length-1];
            }
        }); 
      })
      _this.eeeeeeeeeess=true;
    }
    _this.update_my_temp_from_flag=true;



},
    },
}
_this.data.update_temp=async function(){
       
      let MAX_SIZE=10*1024*1024;
        // 创建一个 FormData 实例  
      add_my_temp_formData = new FormData();  
      let max_size=0;
      // 遍历文件列表，将文件添加到 formData  
      let i=0;
    //   console.log("_this.files",_this.files)
    //   window.ddddd=_this.files
      for (let file of _this.files) {  
        i++;
        max_size=max_size+file.size;
        if (max_size>MAX_SIZE){
          this.$message({
            type: 'info',
            message: '超过上传最大值:'+MAX_SIZE/1024/1024+'M'
          });
          return
        }
        add_my_temp_formData.append('file_'+i, file); // 'files[]' 是服务器接收文件时可能使用的字段名，具体取决于后端配置  
        add_my_temp_formData.append(`file_path${i}`,file.webkitRelativePath);
      }  
      // 添加额外的参数  
      add_my_temp_formData.append('type', 'add_my_temp');  
      add_my_temp_formData.append('dir1_id',_this.data.dir1_id);  
      add_my_temp_formData.append('dir2_id',_this.data.dir2_id);  
      add_my_temp_formData.append('temp_id', _this.data.temp_id);  
      add_my_temp_formData.append('version_id', _this.data.version_id);  
      console.log("add_my_temp_formData",add_my_temp_formData)
    //   add_my_temp_formData.append("path",file.webkitRelativePath)
      // 发送请求到服务器  
      try {  
        const response = await fetch(urls.更新前端组件版本代码_url, {  
          method: 'POST',  
          body: add_my_temp_formData,  
        });  
  
        if (!response.ok) {  
          throw new Error('Network response was not ok');  
        }  
  
        const received_data = await response.json(); // 假设服务器返回 JSON 数据  
        if(received_data.type=="success"){
            
          Vue.prototype.$notify({type: 'success',message: received_data.message||'操作成功'})
        }else{
            
          Vue.prototype.$notify({type: 'error',message: received_data.message||'操作失败'})
        }
      _this.update_my_temp_from_flag=false;//关闭对话框
    
      } catch (error) {  
        console.error('Error:', error);  
      } 
}

}

})

Vue.component2('a_1_0_2_6_1', {  
    template: `
        <div  :class="{ 'a_1_0_2_6_1_lines test': data.true, 'a_1_0_2_6_1_lines_onclick': data.onclick_flag }" @click="handle_click" v-show="show_flag">
        <span :style="'padding-left: '+data._space_+'px;'"></span>
        <span  v-if="data.icon1_show_flag":class="{'icon iconfont':data.true,'icon-right':data.close,'icon-down':data.close==false}"></span>
        
        <span  class="a_1_0_2_6_1_hid_line" style="color:#bcbcbc">{{data.name}}</span>
        <div style="display:inline-block;flex:1;">
        <div style="display:flex;
    justify-content: flex-end;
    display: flex;">
    
        <div  @click="click1($event,k)" v-for="(v,k) in data.icon_data"
        :key="k">
         <a_1_0_3_0_0 style="display: inline-block;"
         :deepcopy_data="v"></a_1_0_3_0_0>
        </div>
        </div>
        </div>
        </div>
`,
data(){
    return{
        show_flag:true,
        data:{
            onclick_flag:false,
            tree_data:{},//
            icon_data:{},
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            false:false,
            close:true,
            name:"",
            _space_:0,
        }
    }
},
methods:{
    handle_click:async function(event){
        //点击当前 高亮显示
        try{//console.log("高亮",this.data.path);
this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
        // /* console.log("我点击了一次")*/
        try{
            if(!this.data.tree_data.check_dct[this.data.path]){
                await this.data.刷新目录1();
            }
            /*console.log("?2")*/}
        catch{}

        if (this.data.click){
            try{
                this.data.click(event)
            
                // console.log("start click2")
            }
            catch{}
            return 
        }


        if (this.data.click_obj){
            try{
                lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
            
                // console.log("start click3")
            }
            catch{}
            return 
        }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    },
    click1:async function(event,k){
       /* console.log(',,,',this.data.icon_data[k].click)*/
        lhp_run_func(this.data.icon_data[k].click);
        if(!this.data.click_stop){event.stopPropagation();}//阻止父级

    }
},

mounted:function(){
    /*console.log("210的deepcopydata",_this.deepcopy_data)*/
let tree_data=_this.deepcopy_data.tree_data;
_this.data.全局配置对象=tree_data['全局配置对象'];
_this.data.add_new=function(name){
    
//更新数据 

//更新数据 
let update_val={
    "type":"change_data",
    "data_type":"set_list",//类型 修改数据
    update_params:[
      {//将路径为path的数据 进行 +1操作 并且存入属性add中 提供给data里面携带@add的属性调用
        name:'@index',
        path:`flow_chat_config.dict.1.base_info.index`,//数据路径
        use:'++s'
      },
    ],
    "postput":[{
        'path':`flow_chat_config.dict.1.dict.@index`,
        'data':{
            "base_info":{
                "process_idx":0,//进程id
                "index":0,//拖拽进组件的id
                "process_dct":{},//存储进程id所属
                "deepcopy_data":{"name":name},"vue_name":"a_1_0_2_7_1","width":"2000px","height":"2000px","scale":"100"},
            "flow_dict":{},//存放当前正在处理的组件
            "dict":{}
        }
      },
      {
        'path':`flow_chat_config.dict.1.base_info`,
        'data':{
            "index":"@index",
        }
      },
    
    ],
  }
//向服务端websocket发送消息
_this.data.全局配置对象.更新(update_val);
}


_this.data.icon_data={
    100:{
        icon_class:"icon iconfont icon-houduan",
        hovertext:"添加新流程",
        click:async function(){
        _this.$prompt('输入新建流程名称', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
          }).then(({ value }) => {
            try{_this.data.add_new(value);}
            catch (err){
                console.log("出错..",err)
            }
            
          }).catch(() => {
            _this.$message({
              type: 'info',
              message: '取消输入'
            });       
          });
        }
        },
}


}

})

Vue.component2('a_1_0_2_7_1', {  
    template: `
        <div :class="{ 'a_1_0_2_7_1_lines test': data.true, 'a_1_0_2_7_1_lines_onclick': data.onclick_flag }" @click="handle_click" v-show="show_flag">
        <span :style="'padding-left: '+data._space_+'px;'"></span>
        <span  v-if="data.icon1_show_flag":class="{'icon iconfont':data.true,'icon-right':data.close,'icon-down':data.close==false}"></span>
        
        <span  class="a_1_0_2_7_1_hid_line" style="color:#bcbcbc">{{data.name}}</span>
        <div style="display:inline-block;flex:1;">
        <div style="display:flex;
    justify-content: flex-end;
    display: flex;">
    
        <div  @click="click1($event,k)" v-for="(v,k) in data.icon_data"
        :key="k">
         <a_1_0_3_0_0 style="display: inline-block;"
         :deepcopy_data="v"></a_1_0_3_0_0>
        </div>
        </div>
        </div>
        </div>
`,
data(){
    return{
        show_flag:true,
        data:{
          onclick_flag:false,
            tree_data:{},//
            icon_data:{},
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            false:false,
            close:true,
            name:"",
            _space_:0,
        }
    }
},
methods:{
  lhp_run_func:function(str_,obj=null,test=false){
      if (obj.includes(".")){
        try{

          let obj_t=window;
          let arr1= obj.split('.');  
          for (let i=0;i<arr1.length;i++){ obj_t=obj_t[arr1[i]]}
          obj=obj_t
        }catch(err){console.log("error:",err);
}
      }
      console.log("obj:",obj)
      if ((typeof str_) ==='function'){
          if (obj!=null){
              return str_(obj)
          }else{
              return str_()
          }
      }
      try{
          if (str_==''){return null;}
          else if (str_.includes('.')){
              let arr = str_.split('.');  
              let run_func=window
              for (let i=0;i<arr.length-1;i++){ run_func=run_func[arr[i]]}
              if (obj!=null){
                  if(test){console.log("lhp_run_func func params:",run_func[arr[arr.length-1]],obj)
}
                  return run_func[arr[arr.length-1]](obj)
              }else{
                  return run_func[arr[arr.length-1]]()
              }
          }else{
              if (obj!=null){
                  return window[str_](obj)
              }else{
                  return window[str_]()
              }
          }
          
    }catch(err){if(test){console.log("lhp_run_func err:",err);
}}
  },
    handle_click:async function(event){
      //点击当前 高亮显示
      try{console.log("高亮",this.data.path);
this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
      //显示编辑界面
      try{
        console.log("this.data.tree_data.选择流程_onclick",this.data.tree_data.选择流程_onclick)
        for(let ii=0;ii<this.data.tree_data.选择流程_onclick.length;ii++){
          let ccc=this.data.tree_data.选择流程_onclick[ii];
          /*console.log("cc",ccc,ccc.func)*/
          await lhp_run_func2(ccc.func,this.data.path);
      }
        
      }catch (err){console.log("errrr:",err);
}
        // /* console.log("我点击了一次")*/
        try{
            if(!this.data.tree_data.check_dct[this.data.path]){
                await this.data.刷新目录1();
            }
            /*console.log("?2")*/}
        catch{}

        if (this.data.click){
            try{
                this.data.click(event)
            
                // console.log("start click2")
            }
            catch{}
            return 
        }




        if (this.data.click_obj){
          try{
            this.lhp_run_func(this.data.click_obj.func,this.data.click_obj.args);
          }
          catch{}
          return 
      }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    },
    click1:async function(event,k){
       /* console.log(',,,',this.data.icon_data[k].click)*/
        lhp_run_func(this.data.icon_data[k].click);
        if(!this.data.click_stop){event.stopPropagation();}//阻止父级

    }
},

mounted:function(){
    let tree_data=_this.deepcopy_data.tree_data;
    _this.data.全局配置对象=tree_data['全局配置对象'];
    _this.data.change_name=function(name){
        
        if(!_this.data.flow_id){_this.data.flow_id=_this.data.path.split(".")[_this.data.path.split(".").length-1]}
    //更新数据 
    
    //更新数据 
    let update_val={
        "type":"change_data",
        "data_type":"set_list",//类型 修改数据
        "postput":[{
            'path':`flow_chat_config.dict.1.dict.${_this.data.flow_id}.base_info.deepcopy_data`,
            'data':{"name":name}
          },
        
        ],
      }
    //向服务端websocket发送消息
    _this.data.全局配置对象.更新(update_val);
    }
    _this.data.del=function(){
        if(!_this.data.flow_id){_this.data.flow_id=_this.data.path.split(".")[_this.data.path.split(".").length-1]}
        //更新数据 
        let update_val={
            "type":"change_data",
            "data_type":"set_list",//类型 修改数据
            "delete":[{
                'path':`flow_chat_config.dict.1.dict.${_this.data.flow_id}`,
              },
            ],
          }
        //向服务端websocket发送消息
        _this.data.全局配置对象.更新(update_val);
        }
_this.data.icon_data={
    90:{
        icon_class:"icon iconfont icon-write",
        hovertext:"修改属性",
        add_show:false,
        click:async function(){
        _this.$prompt('修改名称', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
          }).then(({ value }) => {
            try{_this.data.change_name(value);}
            catch (err){
                console.log("出错..",err)
            }
            
          }).catch(() => {
            _this.$message({
              type: 'info',
              message: '取消输入'
            });       
          });
        }
        },
    100:{
        icon_class:"icon iconfont icon-shanchu",
        hovertext:"删除该流程",
        add_show:false,
        click:async function(){
        
        
            _this.$confirm('此操作将删除, 是否继续?', '提示', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
                type: 'warning'
              }).then(() => {
                _this.data.del();
    
              
              }).catch(() => {
                _this.$message({
                  type: 'info',
                  message: '已取消删除'
                });          
              });



        }
        },
}


}

})

Vue.component2('a_1_0_2_8_1', {  
    template: `
        <div  :class="{ 'a_1_0_2_8_1_lines test': data.true, 'a_1_0_2_8_1_lines_onclick': data.onclick_flag }" @click="handle_click" v-show="show_flag">
        <span :style="'padding-left: '+data._space_+'px;'"></span>
        <span  v-if="data.icon1_show_flag":class="{'icon iconfont':data.true,'icon-right':data.close,'icon-down':data.close==false}"></span>
        
        <span  class="a_1_0_2_8_1_hid_line" style="color:#bcbcbc">{{data.name}}</span>
        <div style="display:inline-block;flex:1;">
        <div style="display:flex;
    justify-content: flex-end;
    display: flex;">
    
        <div  @click="click1($event,k)" v-for="(v,k) in data.icon_data"
        :key="k">
         <a_1_0_3_0_0 style="display: inline-block;"
         :deepcopy_data="v"></a_1_0_3_0_0>
        </div>
        </div>
        </div>
        </div>
`,
data(){
    return{
        show_flag:true,
        data:{
            onclick_flag:false,
            tree_data:{},//
            icon_data:{},
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            false:false,
            close:true,
            name:"",
            _space_:0,
        }
    }
},
methods:{
    handle_click:async function(event){
        //点击当前 高亮显示
        try{//console.log("高亮",this.data.path);
this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
        // /* console.log("我点击了一次")*/
        try{
            if(!this.data.tree_data.check_dct[this.data.path]){
                await this.data.刷新目录1();
            }
            /*console.log("?2")*/}
        catch{}

        if (this.data.click){
            try{
                this.data.click(event)
            
                // console.log("start click2")
            }
            catch{}
            return 
        }


        if (this.data.click_obj){
            try{
                lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
            
                // console.log("start click3")
            }
            catch{}
            return 
        }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    },
    click1:async function(event,k){
       /* console.log(',,,',this.data.icon_data[k].click)*/
        lhp_run_func(this.data.icon_data[k].click);
        if(!this.data.click_stop){event.stopPropagation();}//阻止父级

    }
},

mounted:function(){
    /*console.log("210的deepcopydata",_this.deepcopy_data)*/
let urls=_this.deepcopy_data.tree_data.url;
let check_dct=_this.deepcopy_data.tree_data.check_dct;
//   获取用户的后端组件库目录1列表_url:'/get_ui_dir1',
//   获取用户的后端组件库目录2列表_url:'/get_ui_dir2',
//   获取用户的后端组件库组件列表_url:'/get_ui_temp',
//   获取用户的后端组件库组件版本列表_url:'/get_ui_version',
//   添加后端目录1_url:'/add_ui_dir1',
//   添加后端目录2_url:'/add_ui_dir2',
//   添加后端组件_url:'/add_ui_temp',
//   添加后端组件版本_url:'/add_ui_version',
//   更新后端组件版本_url:'/update_ui_version',

//   获取用户的后端组件库目录1列表_url:'/get_flow_dir1',
//   获取用户的后端组件库目录2列表_url:'/get_flow_dir2',
//   获取用户的后端组件库组件列表_url:'/get_flow_temp',
//   获取用户的后端组件库组件版本列表_url:'/get_ui_version',
//   添加后端目录1_url:'/add_flow_dir1',
//   添加后端目录2_url:'/add_flow_dir2',
//   添加后端组件_url:'/add_flow_temp',
//   添加后端组件版本_url:'/add_flow_version',
//   更新后端组件版本_url:'/update_flow_version',
_this.data.获取用户的后端组件库目录1列表_flag=false;
_this.data.获取用户的后端组件库目录1列表_request=request______({method:'post',url:urls.获取用户的后端组件库目录1列表_url});
_this.data.获取用户的后端组件库目录1列表_recv=function(received_data){
    // {
    //     "type": "okk",
    //     "data": {
    //         "1": {
    //             "base_info": {
    //                 "vue_name": "a_1_0_2_8_1",
    //                 "deepcopy_data": {
    //                     "name": "未命名"
    //                 }
    //             },
    //             "dict": {}
    //         },
    //         "2": {
    //             "base_info": {
    //                 "vue_name": "a_1_0_2_8_1",
    //                 "deepcopy_data": {
    //                     "name": "未命名"
    //                 }
    //             },
    //             "dict": {}
    //         },
    //         "3": {
    //             "base_info": {
    //                 "vue_name": "a_1_0_2_8_1",
    //                 "deepcopy_data": {
    //                     "name": "未命名"
    //                 }
    //             },
    //             "dict": {}
    //         },
    //         "4": {
    //             "base_info": {
    //                 "vue_name": "a_1_0_2_8_1",
    //                 "deepcopy_data": {
    //                     "name": "未命名"
    //                 }
    //             },
    //             "dict": {}
    //         }
    //     }
    // }
    /*console.log("接收数据",received_data,_this.data.path);*/
    _this.data.tree_data.set_dict(received_data.data,_this.data.path);
    check_dct[_this.data.path]=received_data;
    _this.data.获取用户的后端组件库目录1列表_flag=true;
}
_this.data.刷新目录1=async function(){
    let count=0;
    _this.data.获取用户的后端组件库目录1列表_flag=false;
    _this.data.获取用户的后端组件库目录1列表_request({
        body_data:{},
        execute_lst:[
                      {
                        'type':'func',
                        'func':_this.data.获取用户的后端组件库目录1列表_recv,
                        'args':['received_data'],
                      },
                    ]
    });
    await time_sleep(20);
    while(1){
        count++;
        await time_sleep(1);
        if(_this.data.获取用户的后端组件库目录1列表_flag==true){break}
        if(count>500){Vue.prototype.$notify({type: 'error',message: '获取后端目录1列表失败'});break}
    }
}



_this.data.添加后端目录1_request=request______({method:'post',url:urls.添加后端目录1_url});

_this.data.添加后端目录1_recv=function(received_data){
    // {
    //     "type": "okk",
    //     "data": {
    //         "1": {
    //             "base_info": {
    //                 "vue_name": "a_1_0_2_8_1",
    //                 "deepcopy_data": {
    //                     "name": "未命名"
    //                 }
    //             },
    //             "dict": {}
    //         },
    //         "2": {
    //             "base_info": {
    //                 "vue_name": "a_1_0_2_8_1",
    //                 "deepcopy_data": {
    //                     "name": "未命名"
    //                 }
    //             },
    //             "dict": {}
    //         },
    //         "3": {
    //             "base_info": {
    //                 "vue_name": "a_1_0_2_8_1",
    //                 "deepcopy_data": {
    //                     "name": "未命名"
    //                 }
    //             },
    //             "dict": {}
    //         },
    //         "4": {
    //             "base_info": {
    //                 "vue_name": "a_1_0_2_8_1",
    //                 "deepcopy_data": {
    //                     "name": "未命名"
    //                 }
    //             },
    //             "dict": {}
    //         }
    //     }
    // }
    console.log("接收数据",received_data);
    _this.data.tree_data.set_dict(received_data,_this.data.path);
    _this.data.添加后端目录1_flag=true;
}
_this.data.添加后端目录1=async function(name){
    let count=0;
    _this.data.添加后端目录1_flag=false;
    _this.data.添加后端目录1_request({
        body_data:{name:name},
        execute_lst:[
                      {
                        'type':'func',
                        'func':_this.data.添加后端目录1_recv,
                        'args':['received_data'],
                      },
                    ]
    });
    await time_sleep(20);
    while(1){
        count++;
        await time_sleep(1);
        if(_this.data.添加后端目录1_flag==true){break}
        if(count>500){Vue.prototype.$notify({type: 'error',message: '添加后端目录1失败'});break}
    }
}





_this.data.icon_data={
    1:{
        icon_class:"icon iconfont icon-refresh",
        hovertext:"刷新目录1列表",
        add_show:false,
        click:async function(){
            /*console.log("开始刷新目录");*/
            _this.data.刷新目录1();
        }
        },
    2:{

    icon_class:"icon iconfont icon-add_dir1",
    hovertext:"添加后端目录1",
    click:async function(){
        _this.$prompt('添加后端目录1(名称)', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
          }).then(({ value }) => {
           _this.data.添加后端目录1(value);
          }).catch(() => {
            _this.$message({
              type: 'info',
              message: '取消输入'
            });       
          });},
    },
}


}

})

Vue.component2('a_1_0_2_9_1', {  
    template: `
        <div  :class="{ 'a_1_0_2_9_1_lines test': data.true, 'a_1_0_2_9_1_lines_onclick': data.onclick_flag }" @click="handle_click" v-show="show_flag">
        <span :style="'padding-left: '+data._space_+'px;'"></span>
        <span  v-if="data.icon1_show_flag":class="{'icon iconfont':data.true,'icon-right':data.close,'icon-down':data.close==false}"></span>
        
        <span  class="a_1_0_2_9_1_hid_line" style="color:#bcbcbc">{{data.name}}</span>
        <div style="display:inline-block;flex:1;">
        <div style="display:flex;
    justify-content: flex-end;
    display: flex;">
    
        <div  @click="click1($event,k)" v-for="(v,k) in data.icon_data"
        :key="k">
         <a_1_0_3_0_0 style="display: inline-block;"
         :deepcopy_data="v"></a_1_0_3_0_0>
        </div>
        </div>
        </div>
        </div>
`,
data(){
    return{
        show_flag:true,
        data:{
            onclick_flag:false,
            tree_data:{},//
            icon_data:{},
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            false:false,
            close:true,
            name:"",
            _space_:0,
        }
    }
},
methods:{

    handle_click:async function(event){
        //点击当前 高亮显示
        try{//console.log("高亮",this.data.path);
this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
        /* console.log("我点击了一次")*/
        try{
            /* console.log("?")*/
            if(!this.data.tree_data.check_dct[this.data.path]){
                await this.data.刷新目录2();
            }
            /*console.log("?2")*/}
        catch{}

        if (this.data.click){
            try{
                this.data.click(event)
            
                // console.log("start click2")
            }
            catch{}
            return 
        }


        if (this.data.click_obj){
            try{
                lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
            
                // console.log("start click3")
            }
            catch{}
            return 
        }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    },
    click1:async function(event,k){
       /* console.log(',,,',this.data.icon_data[k].click)*/
        lhp_run_func(this.data.icon_data[k].click);
        if(!this.data.click_stop){event.stopPropagation();}//阻止父级

    }
},

mounted:function(){
    /*console.log("210的deepcopydata",_this.deepcopy_data)*/
let urls=_this.deepcopy_data.tree_data.url;
let check_dct=_this.deepcopy_data.tree_data.check_dct;
//   获取用户的后端组件库目录2列表_url:'/get_ui_dir1',
//   获取用户的后端组件库目录2列表_url:'/get_ui_dir2',
//   获取用户的后端组件库组件列表_url:'/get_ui_temp',
//   获取用户的后端组件库组件版本列表_url:'/get_ui_version',
//   添加后端目录2_url:'/add_ui_dir1',
//   添加后端目录2_url:'/add_ui_dir2',
//   添加后端组件_url:'/add_ui_temp',
//   添加后端组件版本_url:'/add_ui_version',
//   更新后端组件版本_url:'/update_ui_version',
//   修改后端目录1属性_url:'/change_ui_dir1'
//   修改后端目录2属性_url:'/change_ui_dir2'
//   修改后端目录1属性_url:'/change_ui_temp'



//   获取用户的后端组件库目录2列表_url:'/get_flow_dir1',
//   获取用户的后端组件库目录2列表_url:'/get_flow_dir2',
//   获取用户的后端组件库组件列表_url:'/get_flow_temp',
//   获取用户的后端组件库组件版本列表_url:'/get_ui_version',
//   添加后端目录2_url:'/add_flow_dir1',
//   添加后端目录2_url:'/add_flow_dir2',
//   添加后端组件_url:'/add_flow_temp',
//   添加后端组件版本_url:'/add_flow_version',
//   更新后端组件版本_url:'/update_flow_version',
_this.data.获取用户的后端组件库目录2列表_flag=false;
_this.data.获取用户的后端组件库目录2列表_request=request______({method:'post',url:urls.获取用户的后端组件库目录2列表_url});
_this.data.获取用户的后端组件库目录2列表_recv=function(received_data){
    /*console.log("接收数据",received_data,_this.data.path);*/
    _this.data.tree_data.set_dict(received_data.data,_this.data.path);
    check_dct[_this.data.path]=received_data;
    _this.data.获取用户的后端组件库目录2列表_flag=true;
}
_this.data.刷新目录2=async function(){
    if(!_this.data.dir1_id){
        let path_l=_this.data.path.split(".");
        _this.data.dir1_id=path_l[path_l.length-1];
    }
    let count=0;
    _this.data.获取用户的后端组件库目录2列表_flag=false;
    _this.data.获取用户的后端组件库目录2列表_request({
        body_data:{dir1_id:_this.data.dir1_id},
        execute_lst:[
                      {
                        'type':'func',
                        'func':_this.data.获取用户的后端组件库目录2列表_recv,
                        'args':['received_data'],
                      },
                    ]
    });
    await time_sleep(20);
    while(1){
        count++;
        await time_sleep(1);
        if(_this.data.获取用户的后端组件库目录2列表_flag==true){break}
        if(count>500){Vue.prototype.$notify({type: 'error',message: '获取后端目录2列表失败'});break}
    }
}



_this.data.添加后端目录2_request=request______({method:'post',url:urls.添加后端目录2_url});

_this.data.添加后端目录2_recv=function(received_data){
    console.log("接收数据",received_data);
    _this.data.tree_data.set_dict(received_data,_this.data.path);
    _this.data.添加后端目录2_flag=true;
}
_this.data.添加后端目录2=async function(name){
    if(!_this.data.dir1_id){
        let path_l=_this.data.path.split(".");
        _this.data.dir1_id=path_l[path_l.length-1];
    }
    let count=0;
    _this.data.添加后端目录2_flag=false;
    _this.data.添加后端目录2_request({
        body_data:{name:name,dir1_id:_this.data.dir1_id},
        execute_lst:[
                      {
                        'type':'func',
                        'func':_this.data.添加后端目录2_recv,
                        'args':['received_data'],
                      },
                    ]
    });
    await time_sleep(20);
    while(1){
        count++;
        await time_sleep(1);
        if(_this.data.添加后端目录2_flag==true){break}
        if(count>500){Vue.prototype.$notify({type: 'error',message: '添加后端目录2失败'});break}
    }
}




_this.data.修改后端目录1属性_request=request______({method:'post',url:urls.修改后端目录1属性_url});

findKeydeepcopy=function (obj, path = []){
    // 遍历对象的所有属性  
    for (let key in obj) {  
        if (obj.hasOwnProperty(key)) {  
            // 更新当前路径  
            let currentPath = [...path, key];  
  
            // 如果当前属性的 key 是 'aaa'，返回路径  
            if (key === 'deepcopy_data') {  
                return currentPath;  
            }  
  
            // 如果当前属性是对象，递归调用  
            if (typeof obj[key] === 'object' && obj[key] !== null) {  
                let result = findKeydeepcopy(obj[key], currentPath);  
                if (result) {  
                    return result;  
                }  
            }  
        }  
    }  
  
    // 如果没有找到 key 为 'aaa' 的对象，返回 null  
    return null;  
}  
_this.data.修改后端目录1属性_recv=function(received_data){
    console.log("接收数据",received_data);
    _this.data.修改后端目录1属性_flag=true;
    let lst=findKeydeepcopy(received_data);
    let copy_data=received_data;
    for(let i=0;i<lst.length;i++){copy_data=copy_data[lst[i]]}
    _this.data.tree_data.change_deepcopy_data(_this.data.path,copy_data);
}
_this.data.修改后端目录1属性=async function(name){
    if(!_this.data.dir1_id){
        let path_l=_this.data.path.split(".");
        _this.data.dir1_id=path_l[path_l.length-1];
    }
    let count=0;
    _this.data.修改后端目录1属性_flag=false;
    _this.data.修改后端目录1属性_request({
        body_data:{name:name,dir1_id:_this.data.dir1_id},
        execute_lst:[
                      {
                        'type':'func',
                        'func':_this.data.修改后端目录1属性_recv,
                        'args':['received_data'],
                      },
                    ]
    });
    await time_sleep(20);
    while(1){
        count++;
        await time_sleep(1);
        if(_this.data.修改后端目录1属性_flag==true){break}
        if(count>500){Vue.prototype.$notify({type: 'error',message: '修改后端目录1属性失败'});break}
    }
}


_this.data.icon_data={
    297:{
      icon_class:"icon iconfont icon-fuzhi",
      hovertext:"复制目录1id",
      add_show:false,
      click:async function(){
        if(!_this.data.dir1_id){
            let path_l=_this.data.path.split(".");
            _this.data.dir1_id=path_l[path_l.length-1];
        }
      let copy_data=`a_${cookie_read("easyedit_userid")}_${_this.data.dir1_id}`
        copy_text(copy_data); 
        Vue.prototype.$notify({type: 'success',message: '已拷贝:'+copy_data})
  
    },
  },
    330:{
        icon_class:"icon iconfont icon-write",
        hovertext:"修改后端目录1属性",
        add_show:false,
        click:async function(){
            _this.$prompt('修改后端目录1(名称)', '提示', {
                confirmButtonText: '确定',
                cancelButtonText: '取消',
              }).then(({ value }) => {
               _this.data.修改后端目录1属性(value);
              }).catch(() => {
                _this.$message({
                  type: 'info',
                  message: '取消输入'
                });       
              });},
        },
    331:{
        icon_class:"icon iconfont icon-refresh",
        hovertext:"刷新目录2列表",
        add_show:false,
        click:async function(){
            /*console.log("开始刷新目录");*/
            _this.data.刷新目录2();
        }
        },
    332:{

    icon_class:"icon iconfont icon-add_dir2",
    hovertext:"添加后端目录2",
    click:async function(){
        _this.$prompt('添加后端目录2(名称)', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
          }).then(({ value }) => {
           _this.data.添加后端目录2(value);
          }).catch(() => {
            _this.$message({
              type: 'info',
              message: '取消输入'
            });       
          });},
    },
}


}

})


Vue.component2('a_1_0_3_0_0', {  
    template: `
    <div class="a_1_0_3_0_0" 
      @mouseenter="handleMouseEnter"  
      @mouseleave="handleMouseLeave"
      :key="refresh"
      >
        <span :style="style2" :class="data.icon_class"></span> 
        <b><span :style="style2" v-if="data.add_show"class="a_1_0_3_0_0_add icon iconfont icon-add-bold"></span></b>
        <div class="a_1_0_3_0_0_sub_menu" :style="hovertext_style">
            <div class="a_1_0_3_0_0_sub_menu_item" ref="text">
                {{ data.hovertext}}
            </div>
        </div>
    </div>
`,  
  data() {
      return {
        refresh:"1",
        show_flag:true,
        hover_flag:false,
        style:{},
        hovertext_style:"visibility:hidden;",
        style2:"",
        data:{
            test:false,
            add_show:true,
            icon_class:"",//图标类
            icon_color:"rgba(231, 231, 231, 0.6)",//图标颜色
            background:"#212121",//背景颜色
            hovercolor:"#ffffff",//高亮颜色
            hovertext:"",//移动到位后的提示文字
            click:null,//点击触发函数
        }
      };
  },
  watch:{
    "data.icon_color":function(e){
        this.setstyle2("color",e);
        this.refresh_func();
    },
    "data.background":function(e){
        this.setstyle2("background",e);
        this.refresh_func();
    },
    "data.icon_class":function(e){
        this.refresh_func();
    },
    "data.hovercolor":function(e){
        this.refresh_func();
    },
    "data.hovertext":function(e){
        this.refresh_func();
    },
  },
  methods:{
    refresh_func:function(e){
        this.refresh=this.refresh=="2"?"1":"2";
    },
    handleMouseEnter(){  
        if(this.hover_flag==false){
            this.hover_flag=true; 
            this.style2=this.style2+`color:${this.data.hovercolor};`;
            let width=get_w2({"_this":this,"ref":`text`});
            // console.log('width',width)
            this.hovertext_style=`left:-${width}`;
        }
      },  
      handleMouseLeave() {  
        if(this.hover_flag==true){
            this.hover_flag=false; 
            let style2="";
            for (let key in this.style){
                style2=style2+`${key}:${this.style[key]};`
            }
            this.hovertext_style="visibility:hidden;";
            this.style2=style2;
        }
      } ,
    setstyle2:function(name,value){
        this.style[name]=value;
        let style2="";
        for (let key in this.style){
            style2=style2+`${key}:${this.style[key]};`
        }
        this.style2=style2;
    },
    handleclick:function(event,flag=null){
        // console.log("...?")
try{this.data.click()}
catch{}
if(!flag){event.stopPropagation();}//阻止父级
    }
  },
  mounted:function(){
    if(_this.deepcopy_data.test==true){
        _this.data.icon_class="icon iconfont icon-shujuku";
        _this.data.icon_color="rgba(231, 231, 231, 0.6)";
        _this.data.background="#212121";
        _this.data.hovercolor="#ffffff";
        _this.data.hovertext="提示字符";
        // _this.data.click=function(){alert("!!!")};

    }
    // console.log("30000",_this.deepcopy_data)
} }
);


Vue.component2('a_1_0_3_1_0', {  
    template: `
    <div class="a_1_0_3_1_0_container">  
        <div class="a_1_0_3_1_0_image_wrapper">  
            <img :src="data.show_imgsrc" alt="Image">  
        </div>  
        <div class="a_1_0_3_1_0_span_wrapper">  
            <span style="color:#bcbcbc">{{data.show_text1}}</span>  
        </div>  
        <div class="a_1_0_3_1_0_span_wrapper">
            <span style="color:#bcbcbc">{{data.show_text2}}</span>  
        </div>  
    </div>
`,  
  data() {
      return {
        refresh:"1",
        data:{
            test:false,
            show_imgsrc:"",
            show_text1:"",
            show_text2:"",
        }
      };
  },
  watch:{
  },
  methods:{
    refresh_func:function(e){
        this.refresh=this.refresh=="2"?"1":"2";
    },
    handleMouseEnter() {  
        if(this.hover_flag==false){
            this.hover_flag=true; 
            this.style2=this.style2+`color:${this.data.hovercolor};`;
        }
      },  
      handleMouseLeave() {  
        if(this.hover_flag==true){
            this.hover_flag=false; 
            let style2="";
            for (let key in this.style){
                style2=style2+`${key}:${this.style[key]};`
            }
            this.style2=style2;
        }
      } ,
    setstyle2:function(name,value){
        this.style[name]=value;
        let style2="";
        for (let key in this.style){
            style2=style2+`${key}:${this.style[key]};`
        }
        this.style2=style2;
    },
    handleclick:function(){
try{this.data.click()}
catch{}
    }
  },
  mounted:function(){
    if(_this.deepcopy_data.test==true){
        _this.data.show_imgsrc="python.png";
        _this.data.show_text1="用户1-基础组件-控件";
        _this.data.show_text2="文本显示框(a0)";

    }
} }
);
// 



Vue.component2('a_1_0_3_2_0_img', {  
    template: `
    <div >
    <div class="a_1_0_3_2_0_container">  
        <div class="a_1_0_3_2_0_image_wrapper">  
            <img :src="data.show_imgsrc" alt="Image">  
        </div>  
        <div class="a_1_0_3_2_0_span_wrapper">  
            <span style="color:#bcbcbc">{{data.show_text1}}</span>  
        </div>  
        <div class="a_1_0_3_2_0_span_wrapper">
            <span style="color:#bcbcbc">{{data.show_text2}}</span>  
        </div>  
    </div>
    </div>
`,  
  data() {
      return {
        refresh:"1",
        data:{
            test:false,
            show_imgsrc:"",
            show_text1:"",
            show_text2:"",
        }
      };
  },
  watch:{
  },
  methods:{
    refresh_func:function(e){
        this.refresh=this.refresh=="2"?"1":"2";
    },
    handleMouseEnter() {  
        if(this.hover_flag==false){
            this.hover_flag=true; 
            this.style2=this.style2+`color:${this.data.hovercolor};`;
        }
      },  
      handleMouseLeave() {  
        if(this.hover_flag==true){
            this.hover_flag=false; 
            let style2="";
            for (let key in this.style){
                style2=style2+`${key}:${this.style[key]};`
            }
            this.style2=style2;
        }
      } ,
    setstyle2:function(name,value){
        this.style[name]=value;
        let style2="";
        for (let key in this.style){
            style2=style2+`${key}:${this.style[key]};`
        }
        this.style2=style2;
    },
    handleclick:function(){
try{this.data.click()}
catch{}
    }
  },
  mounted:function(){
    if(_this.deepcopy_data.test==true){
        _this.data.show_imgsrc="python.png";
        _this.data.show_text1="用户1-基础组件-控件";
        _this.data.show_text2="文本显示框(a0)";

    }
} }
);

Vue.component2('a_1_0_3_2_0', {  
    template: `
    <div class="a_1_0_3_2_0_father_container" v-show="data.show_flag">  
    <div class="a_1_0_3_2_0_title">
    <div style="padding-left:20px;color:#bcbcbc">前端组件库
    
        <div style="display:inline-block;flex:1;">
            <div style="display:flex;
                justify-content: flex-end;
                display: flex;">
        
                <div @click="get_info2">
                    <a_1_0_3_0_0  style="display: inline-block;"
                    :deepcopy_data="v"></a_1_0_3_0_0>
                </div>
            </div>
        </div>
    </div>
    </div>
        <div class="row a_1_0_3_2_0_row"style="margin:0":key="refresh">
            <a_1_0_3_2_0_img class="col-sm-4 col-md-3 col-lg-2 col-6"v-for="(item,indexr) in data.lst" :key="indexr":deepcopy_data="item"></a_1_0_3_2_0_img>
        </div>
    <div class="a_1_0_3_2_0_page">
          <el-pagination
@current-change="handleCurrentChange"
  small
  layout="prev, pager, next"
  :page-size="num"
  :total="total">
</el-pagination>

    </div>
    </div>
`,  
  data() {
      return {
        num:18,//一页显示10张图片
        total:0,
        now_select_page:0,
        v:{
                    icon_class:"icon iconfont icon-refresh",
                    hovertext:"刷新当前页",
                    add_show:false,
        },
        false:false,
        true:true,
        refresh:"1",
        data:{
            show_flag:true,
            test:false,
            lst:[],
            url:'',//请求的url
            request:'',
        }
      };
  },
  watch:{
    'data.url':function(e){
        this.data.request=request______({method:'post',url:e});
        this.get_info({"page":0});
    }
  },
  methods:{
    refresh_func:function(e){
        this.refresh=this.refresh=="2"?"1":"2";
    },
    get_info2:function(){this.get_info({page:this.now_select_page})},
    //选择分页
    handleCurrentChange:function(page){
        this.now_select_page=page;
        this.get_info({
            page:page
        })
    },
    //发送请求获取数据
    get_info:function(obj){
        let num=obj.num||this.num;//分页数量
        let page=obj.page;//查询第几页 的页码  【0为第一页
        try{
            this.data.request({
                body_data:{"num":Number(num),"page":Number(page)-1},
                execute_lst:[
                    {
                        type:'func',
                        func:this.update_data,
                        args:['received_data']
                    }
                ]
            })
            
        console.log("等待服务端处理请求完成")
        }catch{}
    },
    
    //接收到查询数据后显示查询的数据
    update_data:function(received_data){
        // {
        //     "type": "success",
        //     "data": {
        //         "data": [
        //             {
        //                 "id": 1,
        //                 "path": "2-1-1-3",
        //                 "user_id": "2",
        //                 "dir1_id": "1",
        //                 "dir2_id": "1",
        //                 "temp_id": "3",
        //                 "version": "0",
        //                 "temp_name": "None"
        //             },
        //             {
        //                 "id": 2,
        //                 "path": "2-1-1-4",
        //                 "user_id": "2",
        //                 "dir1_id": "1",
        //                 "dir2_id": "1",
        //                 "temp_id": "4",
        //                 "version": "0",
        //                 "temp_name": "None"
        //             },
        //             {
        //                 "id": 3,
        //                 "path": "2-1-1-5",
        //                 "user_id": "2",
        //                 "dir1_id": "1",
        //                 "dir2_id": "1",
        //                 "temp_id": "5",
        //                 "version": "0",
        //                 "temp_name": "测试"
        //             }
        //         ],
        //         "count": 3
        //     }
        // }
        let data=received_data.data.data;
        this.total=received_data.data.count;
        let new_lst=[];
        console.log("datalst",data,data.length)
        for (let i=0;i<data.length;i++){
            let item=data[i];
            new_lst.push({
            show_imgsrc:"/static_base/python.png",
            show_text1:`${item.path}`,
            show_text2:`${item.temp_name}(${item.version})`,
            })
        }
        this.data.lst=new_lst;
        console.log("新数据",this.data.lst)
        this.refresh_func();
        console.log("接收请求数据",received_data)
    }
  },
  mounted:function(){
    if(_this.deepcopy_data.test==true){
        let item={
            show_imgsrc:"python.png",
            "show_text1":"用户1-基础组件-控件",
            "show_text2":"文本显示框(a0)",
        }
        let lst=[];
        for (let i=0;i<100;i++){
            lst.push(JSON.parse(JSON.stringify(item)));
        }
        _this.data.lst=lst;
        _this.data.url="/select_temp1";
        _this.refresh_func();
    }
} }
);


Vue.component2('a_1_0_3_3_0_img', {  
    template: `
    <div >
    <div class="a_1_0_3_3_0_container">  
        <div class="a_1_0_3_3_0_image_wrapper">  
            <img :src="data.show_imgsrc" alt="Image">  
        </div>  
        <div class="a_1_0_3_3_0_span_wrapper">  
            <span  style="color:#bcbcbc">{{data.show_text1}}</span>  
        </div>  
        <div class="a_1_0_3_3_0_span_wrapper">
            <span style="color:#bcbcbc">{{data.show_text2}}</span>  
        </div>  
    </div>
    </div>
`,  
  data() {
      return {
        refresh:"1",
        data:{
            test:false,
            show_imgsrc:"",
            show_text1:"",
            show_text2:"",
        }
      };
  },
  watch:{
  },
  methods:{
    refresh_func:function(e){
        this.refresh=this.refresh=="2"?"1":"2";
    },
    handleMouseEnter() {  
        if(this.hover_flag==false){
            this.hover_flag=true; 
            this.style2=this.style2+`color:${this.data.hovercolor};`;
        }
      },  
      handleMouseLeave() {  
        if(this.hover_flag==true){
            this.hover_flag=false; 
            let style2="";
            for (let key in this.style){
                style2=style2+`${key}:${this.style[key]};`
            }
            this.style2=style2;
        }
      } ,
    setstyle2:function(name,value){
        this.style[name]=value;
        let style2="";
        for (let key in this.style){
            style2=style2+`${key}:${this.style[key]};`
        }
        this.style2=style2;
    },
    handleclick:function(){
try{this.data.click()}
catch{}
    }
  },
  mounted:function(){
    if(_this.deepcopy_data.test==true){
        _this.data.show_imgsrc="python.png";
        _this.data.show_text1="用户1-基础组件-控件";
        _this.data.show_text2="文本显示框(a0)";

    }
} }
);

Vue.component2('a_1_0_3_3_0', {  
    template: `
    <div class="a_1_0_3_3_0_father_container" v-show="data.show_flag">  
    <div class="a_1_0_3_3_0_title">
    <div style="padding-left:20px;color:#bcbcbc">后端组件库</div>
    </div>
        <div class="row a_1_0_3_3_0_row"style="margin:0":key="refresh">
            <a_1_0_3_3_0_img class="col-sm-4 col-md-3 col-lg-2 col-6"v-for="(item,indexr) in data.lst" :key="indexr" :deepcopy_data="item"></a_1_0_3_3_0_img>
        </div>
    <div class="a_1_0_3_3_0_page">
          <el-pagination
@current-change="handleCurrentChange"
  small
  layout="prev, pager, next"
  :page-size="num"
  :total="total">
</el-pagination>

    </div>
    </div>
`,  
  data() {
      return {
        num:18,//一页显示10张图片
        total:0,
        false:false,
        true:true,
        refresh:"1",
        data:{
            show_flag:true,
            test:false,
            lst:[],
            url:'',//请求的url
            request:'',
        }
      };
  },
  watch:{
    'data.url':function(e){
        console.log("更新url")
        this.data.request=request______({method:'post',url:e});
        console.log("发起请求")
        this.get_info({"page":0});
    }
  },
  methods:{
    refresh_func:function(e){
        this.refresh=this.refresh=="2"?"1":"2";
    },
    //选择分页
    handleCurrentChange:function(page){
        this.get_info({
            page:page
        })
    },
    //发送请求获取数据
    get_info:function(obj){
        let num=obj.num||this.num;//分页数量
        let page=obj.page;//查询第几页 的页码  【0为第一页
        try{
            this.data.request({
                body_data:{"num":Number(num),"page":Number(page)-1},
                execute_lst:[
                    {
                        type:'func',
                        func:this.update_data,
                        args:['received_data']
                    }
                ]
            })
            
        console.log("等待服务端处理请求完成")
        }catch{}
    },
    
    //接收到查询数据后显示查询的数据
    update_data:function(received_data){
        // {
        //     "type": "success",
        //     "data": {
        //         "data": [
        //             {
        //                 "id": 1,
        //                 "path": "2-1-1-3",
        //                 "user_id": "2",
        //                 "dir1_id": "1",
        //                 "dir2_id": "1",
        //                 "temp_id": "3",
        //                 "version": "0",
        //                 "temp_name": "None"
        //             },
        //             {
        //                 "id": 2,
        //                 "path": "2-1-1-4",
        //                 "user_id": "2",
        //                 "dir1_id": "1",
        //                 "dir2_id": "1",
        //                 "temp_id": "4",
        //                 "version": "0",
        //                 "temp_name": "None"
        //             },
        //             {
        //                 "id": 3,
        //                 "path": "2-1-1-5",
        //                 "user_id": "2",
        //                 "dir1_id": "1",
        //                 "dir2_id": "1",
        //                 "temp_id": "5",
        //                 "version": "0",
        //                 "temp_name": "测试"
        //             }
        //         ],
        //         "count": 3
        //     }
        // }
        let data=received_data.data.data;
        this.total=received_data.data.count;
        let new_lst=[];
        console.log("datalst",data,data.length)
        for (let i=0;i<data.length;i++){
            let item=data[i];
            new_lst.push({
            show_imgsrc:"/static_base/python.png",
            show_text1:`${item.path}`,
            show_text2:`${item.temp_name}(${item.version})`,
            })
        }
        this.data.lst=new_lst;
        console.log("新数据",this.data.lst)
        this.refresh_func();
        console.log("接收请求数据",received_data)
    }
  },
  mounted:function(){
    if(_this.deepcopy_data.test==true){
        let item={
            show_imgsrc:"python.png",
            "show_text1":"用户1-基础组件-控件",
            "show_text2":"文本显示框(a0)",
        }
        let lst=[];
        for (let i=0;i<100;i++){
            lst.push(JSON.parse(JSON.stringify(item)));
        }
        _this.data.lst=lst;
        _this.data.url="/select_temp2";
        _this.refresh_func();
    }
} }
);


Vue.component2('a_1_0_3_4_0_img', {  
    template: `
    <div >
    <div class="a_1_0_3_4_0_container">  
        <div class="a_1_0_3_4_0_image_wrapper">  
            <img :src="data.show_imgsrc" alt="Image">  
        </div>  
        <div class="a_1_0_3_4_0_span_wrapper">  
            <span>{{data.name}}</span>  
        </div>  
        <div class="a_1_0_3_4_0_span_wrapper">
            
                <div  @click="click1($event,k)" v-for="(v,k) in data.icon_data"
                :key="k">
                <a_1_0_3_0_0 style="display: inline-block;"
                :deepcopy_data="v"></a_1_0_3_0_0>
                </div>
        </div>  
    </div>


<div :key="refresh">
    <el-dialog
    class="a_1_0_3_4_0_tabledialog"
  title="参与者列表"
  :visible.sync="dialogVisible"
  width="30%"
  >
<el-table
:data="data.tableData"
style="width: 100%"
max-height="250">
<el-table-column fixed prop="id" label="参与者id" width="110"></el-table-column>
<el-table-column prop="name" label="参与者名称" width="110"></el-table-column>
<el-table-column fixed="right" label="操作"width="110">
  <template slot-scope="scope">
    <el-button
      @click.native.prevent="del_other_project(scope.$index, data.tableData)"
      type="text"
      size="small">
      移除
    </el-button>
  </template>
</el-table-column>
</el-table>
  <span slot="footer" class="dialog-footer">
    <el-button @click="adddd = '1'">添加</el-button>
    <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
  </span>
</el-dialog>

</div>
<input type="file" ref="change_img" style="display: none;">
    </div>
`,  
  data() {
      return {
        dialogVisible:false,
        change_img:false,
        add_show_flag:false,
        adddd:'0',
        refresh:"1",
        data:{
            tableData:[
                {"id":1,"name":"王五",},
                {"id":2,"name":"王五",},
            ],
            icon_data:{},
            test:false,
            show_imgsrc:"",
            show_text1:"",
            show_text2:"",
        }
      };
  },
  watch:{
    'adddd':function(e){

        this.adddd='0';
        this.$prompt('添加别人参与我的项目', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
          }).then(({ value }) => {
           this.data.添加别人参与我的项目(value);
          }).catch(() => {
            this.$message({
              type: 'info',
              message: '取消输入'
            });    
          });


    }
  },
  methods:{
    handleAvatarSuccess(){},
    beforeUpload(file) {  
      const formData = new FormData();  
      formData.append('file', file);  
      formData.append('id', '1');  
      formData.append('id2', '2');  
  
      axios.post('http://localhost:8888/upload', formData, {  
        headers: {  
          'Content-Type': 'multipart/form-data'  
        }  
      }).then(response => {  
        console.log('Upload successful:', response.data);  
        // 根据需要更新 fileList 或执行其他操作  
      }).catch(error => {  
        console.error('Upload failed:', error);  
      });  
  
      // 阻止自动上传  
      return false;  
    }  ,
    del_other_project:function(del_idx,data){

        this.$confirm('删除别人参与我的项目', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            type: 'warning'
          }).then(() => {
            let other_id=data[del_idx].id;
           this.data.删除别人参与我的项目(other_id,del_idx);
          
          }).catch(() => {
            this.$message({
              type: 'info',
              message: '已取消删除'
            });          
          });

    },
    click1:async function(event,k){
       /* console.log(',,,',this.data.icon_data[k].click)*/
        lhp_run_func(this.data.icon_data[k].click);
        if(!this.data.click_stop){event.stopPropagation();}//阻止父级

    },
    refresh_func:function(e){
        this.refresh=this.refresh=="2"?"1":"2";
    },
    handleMouseEnter() {  
        if(this.hover_flag==false){
            this.hover_flag=true; 
            this.style2=this.style2+`color:${this.data.hovercolor};`;
        }
      },  
      handleMouseLeave() {  
        if(this.hover_flag==true){
            this.hover_flag=false; 
            let style2="";
            for (let key in this.style){
                style2=style2+`${key}:${this.style[key]};`
            }
            this.style2=style2;
        }
      } ,
    setstyle2:function(name,value){
        this.style[name]=value;
        let style2="";
        for (let key in this.style){
            style2=style2+`${key}:${this.style[key]};`
        }
        this.style2=style2;
    },
    handleclick:function(){
try{this.data.click()}
catch{}
    }
  },
  mounted:function(){
    if(_this.deepcopy_data.test==true){
        _this.data.show_imgsrc="python.png";
        _this.data.show_text2="文本显示框(a0)";

    }
    
console.log("44444",_this.deepcopy_data)
    let urls=_this.deepcopy_data.urls;
_this.data.删除我的项目_request=request______({method:'post',url:urls.删除我的项目_url});

_this.data.删除我的项目_recv=function(received_data){
    _this.data.callback_data.删除成功回调(received_data);
    // console.log("接收数据",received_data);
    // _this.data.tree_data.del_path(_this.data.path);
    // // _this.data.tree_data.set_dict(received_data,_this.data.path);
    _this.data.删除我的项目_flag=true;
}
_this.data.删除我的项目=async function(){
    console.log("开始删除我的项目_url",_this.data)
    let count=0;
    _this.data.删除我的项目_flag=false;
    _this.data.删除我的项目_request({
        body_data:{dir1_id:_this.data.dir1_id,user_id:_this.data.user_id,num:_this.data.num},
        execute_lst:[
                      {
                        'type':'func',
                        'func':_this.data.删除我的项目_recv,
                        'args':['received_data'],
                      },
                    ]
    });
    await time_sleep(20);
    while(1){
        count++;
        await time_sleep(1);
        if(_this.data.删除我的项目_flag==true){break}
        if(count>500){Vue.prototype.$notify({type: 'error',message: '删除我的项目失败'});break}
    }
}

_this.data.删除别人参与我的项目_request=request______({method:'post',url:urls.删除别人参与我的项目_url});

_this.data.删除别人参与我的项目_recv=function(received_data){
    let del_idx=received_data.del_idx;
    _this.data.tableData.splice(del_idx, 1);
    // console.log("接收数据",received_data);
    // _this.data.tree_data.del_path(_this.data.path);
    // _this.data.tree_data.set_dict(received_data,_this.data.path);
    _this.data.删除别人参与我的项目_flag=true;
    _this.refresh_func();
}
_this.data.删除别人参与我的项目=async function(other_id,del_idx){
    let count=0;
    _this.data.删除别人参与我的项目_flag=false;
    _this.data.删除别人参与我的项目_request({
        body_data:{dir1_id:_this.data.dir1_id,user_id:_this.data.user_id,num:_this.data.num,other_id:other_id,del_idx:del_idx},
        execute_lst:[
                      {
                        'type':'func',
                        'func':_this.data.删除别人参与我的项目_recv,
                        'args':['received_data'],
                      },
                    ]
    });
    await time_sleep(20);
    while(1){
        count++;
        await time_sleep(1);
        if(_this.data.删除别人参与我的项目_flag==true){break}
        if(count>500){Vue.prototype.$notify({type: 'error',message: '删除别人参与我的项目失败'});break}
    }
}
_this.data.修改我的项目名称_request=request______({method:'post',url:urls.修改我的项目名称_url});

_this.data.修改我的项目名称_recv=function(received_data){
    _this.data.callback_data.修改我的项目名称成功回调(received_data);
    // console.log("接收数据",received_data);
    // _this.data.tree_data.del_path(_this.data.path);
    // // _this.data.tree_data.set_dict(received_data,_this.data.path);
    _this.data.修改我的项目名称_flag=true;
}
_this.data.修改我的项目名称=async function(val){
    console.log("开始删除我的项目_url",_this.data)
    let count=0;
    _this.data.修改我的项目名称_flag=false;
    _this.data.修改我的项目名称_request({
        body_data:{dir1_id:_this.data.dir1_id,user_id:_this.data.user_id,num:_this.data.num,name:val},
        execute_lst:[
                      {
                        'type':'func',
                        'func':_this.data.修改我的项目名称_recv,
                        'args':['received_data'],
                      },
                    ]
    });
    await time_sleep(20);
    while(1){
        count++;
        await time_sleep(1);
        if(_this.data.修改我的项目名称_flag==true){break}
        if(count>500){Vue.prototype.$notify({type: 'error',message: '修改我的项目名称失败'});break}
    }
}



_this.data.添加别人参与我的项目_request=request______({method:'post',url:urls.添加别人参与我的项目_url});

_this.data.添加别人参与我的项目_recv=function(received_data){
    console.log("添加别人参与我的项目_recv received_data",received_data)
    received_data.data.id=received_data.data.user_id;
    _this.data.tableData.push(received_data.data);
    // _this.data.callback_data.添加别人参与我的项目成功回调(received_data);
    // console.log("接收数据",received_data);
    // _this.data.tree_data.del_path(_this.data.path);
    // // _this.data.tree_data.set_dict(received_data,_this.data.path);
    _this.data.添加别人参与我的项目_flag=true;
    _this.refresh_func();
}
_this.data.添加别人参与我的项目=async function(val){
    console.log("开始删除我的项目_url",_this.data)
    let count=0;
    _this.data.添加别人参与我的项目_flag=false;
    _this.data.添加别人参与我的项目_request({
        body_data:{dir1_id:_this.data.dir1_id,user_id:_this.data.user_id,num:_this.data.num,other_id:val},
        execute_lst:[
                      {
                        'type':'func',
                        'func':_this.data.添加别人参与我的项目_recv,
                        'args':['received_data'],
                      },
                    ]
    });
    await time_sleep(20);
    while(1){
        count++;
        await time_sleep(1);
        if(_this.data.添加别人参与我的项目_flag==true){break}
        if(count>500){Vue.prototype.$notify({type: 'error',message: '添加别人参与我的项目失败'});break}
    }
}

_this.data.查看项目参与者目录_request=request______({method:'post',url:urls.查看项目参与者目录_url});

_this.data.查看项目参与者目录_recv=function(received_data){
    // console.log("查看项目参与者目录received_data",received_data)
    let project_user=received_data.project_user;

    _this.data.tableData=project_user;
    // _this.data.callback_data.查看项目参与者目录(received_data);
    // console.log("接收数据",received_data);
    // _this.data.tree_data.del_path(_this.data.path);
    // // _this.data.tree_data.set_dict(received_data,_this.data.path);
    _this.data.查看项目参与者目录_flag=true;
    
    _this.dialogVisible=true;
    _this.refresh_func();
}
_this.data.查看项目参与者目录=async function(){
    let count=0;
    _this.data.查看项目参与者目录_flag=false;
    _this.data.查看项目参与者目录_request({
        body_data:{dir1_id:_this.data.dir1_id,user_id:_this.data.user_id,num:_this.data.num},
        execute_lst:[
                      {
                        'type':'func',
                        'func':_this.data.查看项目参与者目录_recv,
                        'args':['received_data'],
                      },
                    ]
    });
    await time_sleep(20);
    while(1){
        count++;
        await time_sleep(1);
        if(_this.data.查看项目参与者目录_flag==true){break}
        if(count>500){Vue.prototype.$notify({type: 'error',message: '查看项目参与者目录失败'});break}
    }
}


_this.data.修改展示图片_recv=function(received_data){
  _this.data.callback_data.修改展示图片成功回调(received_data);
    _this.data.修改展示图片_flag=true;
    
    _this.refresh_func();
}
_this.data.修改展示图片=async function(file){
  let formData = new FormData();  
  formData.append('file', file);  
  formData.append('dir1_id', _this.data.dir1_id);  
  formData.append('user_id', _this.data.user_id);  
  formData.append('num', _this.data.num);  
  let protocol = window.location.protocol;  
  _this.data.修改展示图片_flag=false;
// 获取当前页面的主机名（例如：localhost 或 www.example.com）  
let hostname = window.location.hostname;  
// 获取当前页面的端口号（如果没有指定端口，则返回空字符串）  
let port = window.location.port ? `:${window.location.port}` : '';  
// 拼接新的 URL  
let newUrl = `${protocol}//${hostname}${port}${urls.修改展示图片_url}`;  

fetch(newUrl, {  
  method: 'POST', // 指定请求方法为 POST  
  body: formData, // 直接将 FormData 对象作为请求体  
})  
.then(response => {  

    // 检查响应状态
    if (!response.ok) {
      
    _this.$notify({
      message: '更新图片失败',
      type: 'error'
    }); 
      throw new Error(`HTTP error! status: ${response.status}`);
  }
  // 解析响应的 JSON 数据
  return response.json();
     
})  
.then(data => {  
  _this.data.修改展示图片_recv(data); 
})  
.catch(error => {  
  _this.$notify({
    message: '更新图片失败'+error,
    type: 'error'
  }); 
});
let count=0;


    await time_sleep(20);
    while(1){
        count++;
        await time_sleep(1);
        if(_this.data.修改展示图片_flag==true){break}
        if(count>500){Vue.prototype.$notify({type: 'error',message: '修改展示图片失败'});break}
    }
}
































let new_icon_data={
  // 99:{

  // icon_class:"icon iconfont icon-qianduan",
  // hovertext:"预览",
  // add_show:false,
  // click:async function(){
    
  //   window.location.href = 'http://39.106.34.123:8000/';
  //     // window.location.href = '/home?user_id='+_this.data.user_id+"&project_dir="+_this.data.dir1_id+"&project_id="+_this.data.num;
      
      
  //     },
  // },
  
  100:{

  icon_class:"icon iconfont icon-shezhi",
  hovertext:"编辑",
  add_show:false,
  click:async function(){
      window.location.href = '/home?user_id='+_this.data.user_id+"&project_dir="+_this.data.dir1_id+"&project_id="+_this.data.num;
      
      
      },
  },

}
if (cookie_read("easyedit_userid")==_this.deepcopy_data.user_id){
 lhp_deepcopy1(new_icon_data,{

    
  198:{

    icon_class:"icon iconfont icon-shanchu",
    hovertext:"删除",
    add_show:false,
    click:async function(){
        
        _this.$confirm('此操作将永久删除, 是否继续?', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
            type: 'warning'
          }).then(() => {
        _this.data.删除我的项目();
          
          }).catch(() => {
            _this.$message({
              type: 'info',
              message: '已取消删除'
            });          
          });
        
        },
    },
    199:{

    icon_class:"icon iconfont icon-write",
    hovertext:"修改项目名称",
    add_show:false,
    click:async function(){
        _this.$prompt('修改目录名称', '提示', {
            confirmButtonText: '确定',
            cancelButtonText: '取消',
          }).then(({ value }) => {
           _this.data.修改我的项目名称(value);
          }).catch(() => {
            _this.$message({
              type: 'info',
              message: '取消输入'
            });       
          });
        
        },
    },
    296:{

    icon_class:"icon iconfont icon-yonghu",
    hovertext:"项目参与者名单",
    add_show:false,
    click:async function(){
        _this.data.查看项目参与者目录();
        },
    },
    297:{

    icon_class:"icon iconfont icon-xiugaitupian",
    hovertext:"修改图片",
    add_show:false,
    add_show:false,
    click:async function(){
      if(!_this.change_img_init){
        _this.change_img_init=true;

    _this.$refs.change_img.addEventListener('change', () => { 
      // 获取所选文件的 File 对象  
    let file = _this.$refs.change_img.files[0];  
  
    // 检查文件是否存在  
    if (!file) {  
        console.log('没有选择文件。');  
        return;  
    }  
  
    // 获取文件的名称和类型  
    let fileName = file.name;  
    let fileType = file.type;  
  
    // 检查文件名是否以 .jpg 结尾（不区分大小写）  
    let isJPGByName = fileName.toLowerCase().endsWith('.png');  
    


    // 检查文件的 MIME 类型是否为 image/png  
    let isPNGByType = fileType === 'image/png';
  
    // 如果文件名和类型都不匹配 .jpg，则打印消息  
    if (!isJPGByName || !isPNGByType) {  
     
      _this.$notify({
        message: '上传失败,后缀不是png',
        type: 'error'
      });
    } else {  
      _this.data.修改展示图片(_this.$refs.change_img.files[0]);
    }  
  

      
  });  

      }
      _this.$refs.change_img.click();  
        },
    },
 })
}
_this.data.icon_data=new_icon_data;
} }
);

Vue.component2('a_1_0_3_4_0', {  
  template: `
  <div class="a_1_0_3_4_0_father_container" v-show="data.show_flag">  
  <div class="a_1_0_3_4_0_title">
  <div style="padding-left:20px;color:#bcbcbc">项目列表
  
      <div style="display:inline-block;flex:1;">
      <div style="display:flex;
  justify-content: flex-end;
  display: flex;">
  
  </div>
  </div>
  </div>
  </div>
      <div class="row a_1_0_3_4_0_row"style="margin:0;padding:10px;":key="refresh">
          <a_1_0_3_4_0_img class="col-sm-4 col-md-3 col-lg-2 col-6"v-for="(item,indexr) in data.lst" :key="indexr":deepcopy_data="item">
          
          </a_1_0_3_4_0_img>
      </div>
  <div class="a_1_0_3_4_0_page">

  </div>
  </div>
`,  
data() {
    return {
      num:18,//一页显示10张图片
      total:0,
      now_select_page:0,
      false:false,
      true:true,
      refresh:"1",
      data:{
          show_flag:true,
          test:false,
          lst:[],
          url:'',//请求的url
          request:'',
      }
    };
},
watch:{
  'data.url':function(e){
      this.data.request=request______({method:'post',url:e});
      this.get_info({"page":0});
  }
},
methods:{
  refresh_func:function(e){
      this.refresh=this.refresh=="2"?"1":"2";
  },
  get_info2:function(){this.get_info({page:this.now_select_page})},
  //选择分页
  handleCurrentChange:function(page){
      this.now_select_page=page;
      this.get_info({
          page:page
      })
  },
},
mounted:function(){
  randonstr=function (length) {  
    const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';  
    let result = '';  
    const charactersLength = characters.length;  
    for (let i = 0; i < length; i++) {  
        result += characters.charAt(Math.floor(Math.random() * charactersLength));  
    }  
    return result;  
  }  
  _this.callback_data={};
  _this.callback_data.删除成功回调=function(received_data){
      let num=received_data.num;
      for (let i=0;i<_this.data.lst.length;i++){
          if (_this.data.lst[i].num==num){
              _this.data.lst.splice(i, 1);  
              break
          }
      }
      _this.refresh_func();
  }
  _this.callback_data.修改我的项目名称成功回调=function(received_data ){
      let num=received_data.num;
      let name=received_data.name;
      for (let i=0;i<_this.data.lst.length;i++){
          if (_this.data.lst[i].num==num){
              _this.data.lst[i].name=name;
              break
          }
      }
      _this.refresh_func();

  }
  _this.callback_data.修改展示图片成功回调=function(received_data){
    let num=received_data.num;
    for (let i=0;i<_this.data.lst.length;i++){
        if (_this.data.lst[i].num==num){
          _this.data.lst[i]['show_imgsrc']=get_src(_this.data.lst[i]);
            break
        }
    }
    _this.refresh_func();

  }
  let urls=_this.deepcopy_data.urls;
  let get_src=function(obj){
    console.log("########obj",JSON.parse(JSON.stringify(obj)));
        let protocol = window.location.protocol;  
      // 获取当前页面的主机名（例如：localhost 或 www.example.com）  
      let hostname = window.location.hostname;  
      // 获取当前页面的端口号（如果没有指定端口，则返回空字符串）  
      let port = window.location.port ? `:${window.location.port}` : '';  
      // 拼接新的 URL  
      let newUrl = `${protocol}//${hostname}${port}${urls.获取图片_url}/${randonstr(20)}?user_id=${obj.user_id}&dir1_id=${obj.dir1_id}&num=${obj.num}`; 
            return newUrl
  }
  _this.data.添加新项目=function(obj){
      console.log("添加新项目:",obj);
      obj['show_imgsrc']=get_src(obj);
      obj['other_lst']=obj.other_lst;
      obj['show_text2']=obj.name;
      obj['callback_data']=_this.callback_data;
      obj.urls=urls;
      _this.data.lst.push(obj);
      _this.refresh_func();
  }
  _this.data.设置显示项目=function(obj){
      // {
      //     "user_id":'..'
      //     "dir1_id":'xx',//目录id
      //     "get_my_project_all": [
      //         {
      //             "name": "发",
      //             "other_lst": [
      //                 "2"
      //             ],
      //             "last_time": 1729244346.0308459,
      //             "num": 1
      //         }
      //     ]
      // }
      let new_lst=[];
      let data=obj.project_all;
      console.log("设置显示项目:",obj);
      console.log("datalst",data,data.length)
      for (let i=0;i<data.length;i++){
          let item=data[i];
          item['dir1_id']=obj.dir1_id;
          item['user_id']=obj.user_id;
          item['show_imgsrc']=get_src(item);
          item['other_lst']=obj.other_lst;
          item['show_text2']=obj.name;
          item['callback_data']=_this.callback_data;
          item.urls=urls;
          new_lst.push(item);
      }
      console.log("new_lst:",new_lst)
      _this.data.lst=new_lst;

      _this.refresh_func();
  }
} }
);

// config 只可以监听1级往后的对象  只可以清空1级往后的属性  只可以删除2级往后的属性
//需要js-md5的支持 用来判断子数据是否更新
//需要自己封装的request______

function up_ws_class1(obj_params) {  
    let _this=this;
    _this.connect_flag=false;
    _this.log_flag=false;
    _this.log_print=function(...args){
        // console.log(...args)
        if(_this.log_flag==true){
            // console.log(...args)
        }
    }
    
    _this.template_name="lhp_set_config_____1";
    //待更新的列表
    _this.objs=[];
    //数据
    _this.data={};
    //匹配路径
    _this.check_path=function(a, b) {  
        //a:监听的路径
        //b:修改的路径
        // 检查字符串a是否是字符串b的前缀  
        // console.log("ba",b,a)
        if (a==b){
            return {type:true,path:''}
        }
        else if(a==''){
            return {type:true,path:b}; 
        }
        else if (b.startsWith(a)) {  
            // aa.bb   aa.bb.cc  {type:true,path:'cc'}
            // aa.bbb  aa.bb.cc  {type:false}
            _this.log_print('"',a,'" "',b,'"')
            let new_path=b.slice(a.length)
            if(new_path[0]!='.'){
                return {type:false}
            }else{
                return {type:true,path:new_path.slice(1)}; 
            }
            
        }  
        // 检查字符串b是否是字符串a的前缀 
        // aa.aa.bb    aa.a   {type:false}    
        // aa.aa.bb    aa.aa  {type:true,path:''}
        else if (a.startsWith(b)) {  
            if(a.slice(b.length)[0]=='.'||b==''){
            return {type:true,path:''};  
            }else{
                return {type:false}
            }
        }  
        // 如果都不是前缀，则根据需求返回相应的值（这里假设返回b）  
        else {  
            return {type:false}; 
        }  
    }  
    
    _this.check_path2=function(a, b) {  
        //a:监听的路径
        //b:修改的路径
        // 检查字符串a是否是字符串b的前缀  
        if (b.startsWith(a)&&(a!=b)) {
            // aa.bb   aa.bb.cc  {type:true,path:'cc'}
            // aa.bbb  aa.bb.cc  {type:false}
            let new_path=b.slice(a.length)
            if(new_path[0]!='.'){
                return false
            }else{
                return true; 
            }
            
        }
        // 如果都不是前缀，则根据需求返回相应的值（这里假设返回b）  
        else {
            return false; // 或者可以返回a，或者抛出错误，取决于你的需求  
        }  
    }  
    //同步数据到注册中
    _this.update_val2regist=function(obj){
        if(obj.data_type=="set_list"&&obj.path){
            for(let i=0;i<_this.objs.length;i++){
                let oobj=_this.objs[i];
                let check_res=_this.check_path(oobj.path,obj.path);
                // _this.log_print(occheck_path,ccheck_path,"匹配路径:",check_res)
                if (check_res.type==false){continue}
                console.log(oobj._this.data.var_name,'匹配路径成功',oobj.path,obj.path,'【',check_res.path,'】')
                oobj.func(obj)
            }
            // return
        }
        //obj 被同步的数据
        //##################开始匹配路径然后同步数据
if(!Array.isArray(obj.path)){obj.path=[obj.path]}
for (let kkkk=0;kkkk<obj.path.length;kkkk++){
    let ccheck_path=obj.path[kkkk];
    for(let i=0;i<_this.objs.length;i++){
        let oobj=_this.objs[i];
        _this.log_print(oobj._this.data.var_name,"更新第",i+1,"个注册对象:",oobj);
        //匹配路径 不满足就跳过当前匹配 不更新注册对象 【不运行注册对象的回调函数】
        _this.log_print(oobj._this.data.var_name,'当前匹配',i+1,'//',_this.objs.length,oobj,'//',_this.objs)
        try{if(oobj._this.data.test_flag==true){_this.log_print(oobj._this.data.var_name,'开始匹配路径:',oobj.path,ccheck_path)};}catch{}
        
        let check_res=_this.check_path(oobj.path,ccheck_path);
        // _this.log_print(occheck_path,ccheck_path,"匹配路径:",check_res)
        if (check_res.type==false){
            _this.log_print(oobj._this.data.var_name,'匹配路径不成功',oobj.path,ccheck_path,'【',check_res.path,'】');
            continue}
            _this.log_print(oobj._this.data.var_name,'匹配路径成功',oobj.path,ccheck_path,'【',check_res.path,'】');
        let now_check_path=oobj.path;
        if (oobj.path==''){now_check_path=check_res.path}
        else if (check_res.path!=''){now_check_path=now_check_path+'.'+check_res.path}
        
        
        try{if(oobj._this.data.test_flag==true){_this.log_print(oobj._this.data.var_name,'匹配路径成功:',now_check_path)};}catch{}
            // try{
                //新增数据  或者 修改数据
                if (obj.data_type=="postput"){
                
                _this.log_print("开始更新postput:",obj);
                let temp_val1=_this.data;
                try{if(oobj._this.data.test_flag==true){_this.log_print(oobj._this.data.var_name,'开始计算数据:postput')}}catch{}
                let temp_val2=[];
                //根据注册信息 找到路径上的数据
                if(now_check_path!=''){temp_val2=now_check_path.split(".");}
                _this.log_print('now_check_path',temp_val1,now_check_path)
                for(let j=0;j<temp_val2.length;j++){temp_val1=temp_val1[temp_val2[j]]}
                //匹配md5值
                // let new_md5=md5(JSON.stringify(temp_val1));
                // if (new_md5!=oobj.md5[now_check_path]){
                //     oobj.md5[now_check_path]=new_md5;
                //     let paramss={path:check_res.path,data:temp_val1,data_type:obj.data_type};
                //     // _this.log_print("组件:",oobj,oobj._this.data.var_name,"更新数据:",paramss);
                //     //执行回调
                //     oobj.func(paramss);
                // }
                let paramss={path:check_res.path,data:temp_val1,data_type:obj.data_type};
                try{if(oobj._this.data.test_flag==true){_this.log_print(oobj._this.data.var_name,"传参数据1:",paramss)}}catch{}
                oobj.func(paramss);
            }

                //删除数据 或者 清空数据
                else if (obj.data_type=="delete"){
                // _this.log_print("更新delete:",obj);
                //删除相关的临时变量【用于存储md5
                //删除子集
                // for (let key in oobj.md5){
                //     if(this.check_path2(now_check_path,key)){delete oobj.md5[key]}
                // }
                // //删除当前
                // delete oobj.md5[now_check_path]
                //执行回调
                let callback_params={path:check_res.path,data_type:obj.data_type};
                // _this.log_print("执行回调:",callback_params);
                oobj.func(callback_params)}
                else if(obj.data_type=="clear"){
                // _this.log_print("更新clear:",obj);
                //删除相关的临时变量【用于存储md5
                //删除子集
                // for (let key in oobj.md5){
                //     if(this.check_path2(now_check_path,key)){try{delete oobj.md5[key]}catch{}}
                // }
                // oobj.md5[now_check_path]=clear_md5;//设置md5
                //执行回调
                let callback_params={path:check_res.path,data_type:obj.data_type};
                // _this.log_print("执行回调:",callback_params);
                oobj.func(callback_params)}
                else if (obj.data_type=="insert"){
                
                    // _this.log_print("更新postput:",obj);
                    let temp_val1=_this.data;
                    try{if(oobj._this.data.test_flag==true){_this.log_print(oobj._this.data.var_name,'开始计算数据:postput')}}catch{}
                    let temp_val2=[];
                    //根据注册信息 找到路径上的数据
                    if(now_check_path!=''){temp_val2=now_check_path.split(".");}
                    for(let j=0;j<temp_val2.length;j++){temp_val1=temp_val1[temp_val2[j]]}
                    //匹配md5值
                    // let new_md5=md5(JSON.stringify(temp_val1));
                    // if (new_md5!=oobj.md5[now_check_path]){
                    //     oobj.md5[now_check_path]=new_md5;
                    //     let paramss={path:check_res.path,data:temp_val1,data_type:obj.data_type};
                    //     // _this.log_print("组件:",oobj,oobj._this.data.var_name,"更新数据:",paramss);
                    //     //执行回调
                    //     oobj.func(paramss);
                    // }
                    let paramss={path:check_res.path,data:temp_val1,data_type:obj.data_type,before_idx:obj.before_idx};
                    try{if(oobj._this.data.test_flag==true){_this.log_print(oobj._this.data.var_name,"传参数据1:",paramss)}}catch{}
                    oobj.func(paramss);
                }
            // }
            // catch{
                if(oobj.error_count==undefined){oobj.error_count=1;}
                else{oobj.error_count++;}
                if (oobj.type=='try1'&&oobj.error_count>1){_this.objs.slice(i,1);i--;}
                else if (oobj.type=='try2'){_this.objs.slice(i,1);i--;}
            // }
        
    }
}
    },
    //同步数据到其他组件
    _this.update_val=function(obj){
        let new_obj=JSON.parse(JSON.stringify(obj))
        // _this.log_print("接收的数据:",obj)
        // _this.log_print("当前注册信息数量:",_this.objs.length)
        // _this.log_print("当前注册信息:",_this.objs)
        let clear_md5=null;
        // _this.log_print("匹配other_callback",1);
        //匹配其他回调
        let temp_key=null;let temp_val=null;

        //初始化数据
        if (obj.type=="change_data"){
            
            //##################将数据保存到当前对象中
            //路径为'' 表示 获取的是完整的配置 
            if(obj.path==''){
                _this.data=obj.data;
                _this.get_all_flag=true;//获取所有配置完成
            //postput表示新增数据或者修改数据   直接通过函数拷贝就行
            }else if(obj.data_type=="postput"){
                let res=lhp_set_config_websocket_set_data.postput({
                    data:_this.data,
                    path:obj.path,
                    copy_data:obj.data
                })
                if(res.type=="error"){
                    _this.log_print(res.message);
                    return
                }
                
    _this.log_print("开始同步数据到注册的组件中...")
    _this.update_val2regist(obj);//同步数据到注册中
            }
            //删除数据  只有_this.data.xxx.xxx 更子一级的才可以被删除  第一层子级 不允许被删除
            else if(obj.data_type=="delete"){
                let res=null;
                if (typeof obj.path==='string'){
                    res=lhp_set_config_websocket_set_data.delete({
                    data:_this.data,
                    path:obj.path,
                    })
                    if(res.type=="error"){
                        _this.log_print(res.message);
                        return
                    }

                }else if( Array.isArray(obj.path)){
                    for (let zzzz=0;zzzz<obj.path.length;zzzz++){
                        res=lhp_set_config_websocket_set_data.delete({
                        data:_this.data,
                        path:obj.path[zzzz],
                        })
                        if(res.type=="error"){
                            _this.log_print(res.message);
                            return
                        }

                    }
                }
    
            
    _this.update_val2regist(obj);//同步数据到注册中
    //类型为清空数据
    }else if(obj.data_type=="clear"){
        
        let res=lhp_set_config_websocket_set_data.clear({
            md5_flag:true,
            data:_this.data,
            path:obj.path,
        })
    if(res.type=="error"){
        _this.log_print(res.message);
        return
    }
    clear_md5=res.md5
    
    _this.update_val2regist(obj);//同步数据到注册中
}else if(obj.data_type=='set_list'){
        if(!(obj.delete===undefined)){
            for (let idx_=0;idx_<obj.delete.length;idx_++){
                if (typeof obj.delete[idx_].path==='string'){
                    let res=lhp_set_config_websocket_set_data.delete({
                    data:_this.data,
                    path:obj.delete[idx_].path,
                    })
                }else if( Array.isArray(obj.delete[idx_].path)){
                    for (let zzzz=0;zzzz<obj.delete[idx_].path.length;zzzz++){
                        let res=lhp_set_config_websocket_set_data.delete({
                        data:_this.data,
                        path:obj.delete[idx_].path[zzzz],
                        })
    
                    }
                }
                obj.delete[idx_].data_type='delete';
                _this.update_val2regist(obj.delete[idx_]);//同步数据到注册中
    
            }
        }
        if(!(obj.delete2===undefined)){
            for (let idx__1=0;idx__1<obj.delete2.length;idx__1++){
    
                let objjj_lst=obj.delete2[idx__1].lst
                let ppah_before=obj.delete2[idx__1].delete_before
                for (let idx_=0;idx_<objjj_lst.length;idx_++){
                        let del_dct={
                            data:_this.data,
                            path:ppah_before+'.'+objjj_lst[idx_],
                            }
                        let res=lhp_set_config_websocket_set_data.delete(del_dct)
                        del_dct.data_type='delete';
                    _this.update_val2regist(del_dct);//同步数据到注册中
        
                }
    
            }
        }
        if(!(obj.clear===undefined)){
            for (let idx_=0;idx_<obj.clear.length;idx_++){
                let res=lhp_set_config_websocket_set_data.clear({
                    md5_flag:true,
                    data:_this.data,
                    path:obj.clear[idx_].path,
                })
                obj.clear[idx_].data_type='clear';
                _this.update_val2regist(obj.clear[idx_]);//同步数据到注册中
    
            }
        }
        if(!(obj.postput===undefined)){
            
            for (let idx_=0;idx_<obj.postput.length;idx_++){
                let res=lhp_set_config_websocket_set_data.postput({
                    md5_flag:true,
                    data:_this.data,
                    path:obj.postput[idx_].path,
                    copy_data:obj.postput[idx_].data
                })
                obj.postput[idx_].data_type='postput';
                _this.update_val2regist(obj.postput[idx_]);//同步数据到注册中
    
            }
        }
        if(!(obj.insert===undefined)){
    
            for (let idx_=0;idx_<obj.insert.length;idx_++){
                let res=lhp_set_config_websocket_set_data.insert({
                    md5_flag:true,
                    data:_this.data,
                    path:obj.insert[idx_].path,
                    copy_data:obj.insert[idx_].data,
                    before_idx:obj.insert[idx_].before_idx
                })
                obj.insert[idx_].data_type='insert';
                _this.update_val2regist(obj.insert[idx_]);//同步数据到注册中
    
            }
        }
    }
    

    if(obj.path){
        console.log("start run update_val2regist",new_obj)
        _this.update_val2regist(new_obj);//同步数据到注册中
    }

          
            
        }
        //匹配其他回调
        if (!(obj.other_callback===undefined)){
            // _this.log_print("匹配other_callback",2);
            for (let temp_idx=0;temp_idx<obj.other_callback.length;temp_idx++){
                // _this.log_print("匹配other_callback",3);
                temp_key=obj.other_callback[temp_idx].key;//回调的key
                temp_val=obj.other_callback[temp_idx].data;//回调的参数
                //遍历注册对象 匹配注册 然后更新
                for(let i=0;i<_this.objs.length;i++){
                    let oobj=_this.objs[i];
                    // _this.log_print("匹配other_callback",4,i,oobj,oobj.other_callback,temp_key);
                    if(!(oobj.other_callback===undefined)){
                        if (temp_key in oobj.other_callback){
                            try{
                                // _this.log_print("匹配other_callback",5,temp_key,temp_val);
                                oobj.other_callback[temp_key](temp_val);
                                // _this.log_print("匹配other_callback",6);
                            }catch (err){_this.log_print(oobj._this.data.var_name,"匹配other_callback 7",temp_key,'异常，执行函数时出错:',err)}
                        }
                    }
                }
            }
        }
    }
    //连接服务器的websocket
    _this.connect_socket=function(func){
        
        _this.log_print("1开始连接服务器")
    _this.ws = new WebSocket("ws://" + window.location.host + "/websocket");
    // WebSocket连接成功后的回调
    _this.ws.onopen = function(event) {
        _this.connect_flag=true;
        _this.log_print("2运行连接成功后执行的回调函数")
        try{func()}catch{}//func 运行连接成功后执行的回调函数
        //params 附带参数 如账号信息
        // _this.ws.send(JSON.stringify({params:{},"type":"get_all"}));
        // _this.ws.send(JSON.stringify({params:_this.return_params(),"type":"get_all"}));
    };
    // 接收服务器消息的回调
    _this.ws.onmessage = function(event) {
        // _this.log_print("3接收服务器消息的回调")
        //格式化数据
        // _this.log_print("1.格式化数据")
        let recv_data=null;
        try{recv_data=JSON.parse(event.data);}catch{
            Vue.prototype.$notify({type: 'error',message: 'event.data错误'});
            _this.log_print("event.data转json错误:",event.data);
            return
        }
        // _this.log_print("2.异常检查")
        //如果是错误信息 则弹窗
        if (recv_data.type=="error"){
            Vue.prototype.$notify({type: 'error',message: recv_data.message||'错误'});_this.log_print("数据更新失败:",recv_data.message,recv_data);return null;}
        // try{
            //将服务器下发的数据转为json格式 {path:"更新数据的路径 为空代表所有数据","data":data}
            
        let start_ti=new Date().getTime();
        console.log("开始更新");
        
        console.log("ws接收服务端等待时间:",(new Date().getTime()-window.上传服务器时间)/1000)
            _this.update_val(recv_data);
        console.log("更新耗时: " + (new Date().getTime()-start_ti)/1000 + " 秒");
        // }
        // catch{Vue.prototype.$notify({type: 'error',message: '函数运行错误'});}
    };

    // WebSocket关闭时的回调
    _this.ws.onclose = function(event) {
        _this.log_print("4websocket已经关闭.");
        _this.connect_socket();
    };
    // 错误处理
    _this.ws.onerror = function(error) {
        console.error("5WebSocket错误:", error);
    };
    }
    _this.add_params_func_lst=[];
    // 添加前置执行函数 func({"func":func,"path":path})
    // path为要监听的路径 通过判断path路径的md5值是否一致来更新 如果path路径不存在 则不执行
    _this.before_objs=[];
    _this.add_before_func=function(obj){
        _this.before_objs.push(obj);
    }

    _this.lhp_vue_set=function(obj_){
        let data_type=obj_.data_type;//要修改的数据类型  post||put delete clear
        let _this=obj_._this;//this vue对象
        let path=obj_.path;//path为data_obj要修改的数据的路径
        let data=obj_.data;//data为修改的数据
        //类型为新增或者修改
        if (data_type=='postput'){
        let change_obj=_this.data;
        let last_path=null;
        if (path.indexOf(".") !== -1){
            let path_lst=path.split(".");
            for (let i=0;i<path_lst.length-1;i++){change_obj=change_obj[path_lst[i]]}
            last_path=path_lst[path_lst.length-1];
        }else{last_path=path}
        // console.log("path",path)
        // console.log("_this.$set(change_obj,last_path,data)",change_obj,last_path,data)
        _this.$set(change_obj,last_path,JSON.parse(JSON.stringify(data)))
        //类型为删除
        }else if(data_type=="delete"){
            let change_obj=_this.data;
            let father_idx=null;
            let father_obj=null;
            if (path.indexOf(".") !== -1){
                let path_lst=path.split(".");
                if (path_lst.length<=1){console.log("delete异常 数量小于等于1");
return}
                for (let i=0;i<path_lst.length-1;i++){father_obj=change_obj;father_idx=path_lst[i];change_obj=change_obj[path_lst[i]];}
                let last_idx=path_lst[path_lst.length-1];
                let new_data=JSON.parse(JSON.stringify(change_obj));
                if(typeof new_data =="object") {  
                    if (Array.isArray(new_data)){
                        new_data.splice(last_idx,1);
    
                    }else{
                        delete new_data[last_idx]
                    }
                _this.$set(father_obj,father_idx,new_data)
            }}else{console.log("delete异常 数量小于2");
return}
    
            
    //类型为清空数据
    }else if(data_type=="clear"){
        let change_obj=_this.data;
        let last_key=null;
        if (path.indexOf(".") !== -1){
            let path_lst=path.split(".");
            for (let i=0;i<path_lst.length-1;i++){change_obj=change_obj[path_lst[i]]}
            last_key=path_lst[path_lst.length-1];
        }else{
            last_key=path;
        
        }
        let temp_val=change_obj[last_key]
    switch (typeof temp_val) {  
            case 'object':  
                // 注意：这里会匹配到null，因为null也是object类型  
                // 需要额外检查是否为null  
                if (temp_val === null) {  
                    change_obj[last_key] = null; // 或者你可以将null也设置为{}  
                } else if (Array.isArray(temp_val)) {  
                    change_obj[last_key] = [];  
                } else {  
                    change_obj[last_key] = {};  
                }  
                break;  
            case 'string':  
            change_obj[last_key] = '';  
                break;  
            case 'number':  
            change_obj[last_key] = 0;  
                break;  
            case 'boolean':  
            change_obj[last_key] = false;  
                break;  
    
    }
    
    
    }else if(data_type=='insert'){
        // let before_idx=obj_.before_idx;
        let change_obj=_this.data;
        // let last_path=null;
        // console.log("insert检查-1 obj_",obj_)
        // console.log("insert检查 前data",JSON.parse(JSON.stringify(_this.data.data)))
        if (path.indexOf(".") !== -1){
            let path_lst=path.split(".");
            for (let i=0;i<path_lst.length-1;i++){change_obj=change_obj[path_lst[i]]}
            last_path=path_lst[path_lst.length-1];
        }else{last_path=path}
        // let new_val=JSON.parse(JSON.stringify(change_obj[last_path]));
        
        // if (before_idx===null || (!(before_idx===undefined))){
        //     new_val.push(JSON.parse(JSON.stringify(obj_.copy_data)));
        // }else{
        //     new_val.splice(before_idx,0,JSON.parse(JSON.stringify(obj_.copy_data))); 
        // }
        console.log("insert检查 path",path)
        console.log("insert检查 change_obj,last_path,new_val",change_obj,last_path)
        _this.$set(change_obj,last_path,JSON.parse(JSON.stringify(data)))
        console.log("insert检查 后data",JSON.parse(JSON.stringify(_this.data)))
        //类型为删除
        }
    }
    let isPlainObject=function(variable) {  
        return variable !== null &&  
               typeof variable === 'object' &&  
               !Array.isArray(variable) &&  
               Object.getPrototypeOf(variable) === Object.prototype;  
    } 
    let isArray=function(variable) {  
        return Array.isArray(variable)
    } 
    _this.lhp_set1=function(obj_){
        let data_type=obj_.data_type;//要修改的数据类型  post||put delete clear
        let _this=obj_._this;//this vue对象
        let path=obj_.path;//path为data_obj要修改的数据的路径
        let data=obj_.data;//data为修改的数据
        // console.log("lhp_set1",obj_)
        //类型为新增或者修改
        if (data_type=='postput'){
        let change_obj=_this.data;
        let last_path=null;
        if (path.indexOf(".") !== -1){
            let path_lst=path.split(".");
            for (let i=0;i<path_lst.length-1;i++){change_obj=change_obj[path_lst[i]]}
            last_path=path_lst[path_lst.length-1];
        }else{last_path=path}
        // console.log("change_obj",change_obj)
        // console.log("last_path",last_path)
        if(isPlainObject(change_obj)){
            if(change_obj.hasOwnProperty(last_path)){
                lhp_deepcopy1(change_obj[last_path],JSON.parse(JSON.stringify(data)));

            }else{
                change_obj[last_path]=JSON.parse(JSON.stringify(data));
            }
        }else if(isArray(change_obj)){
            if(change_obj[last_path]!=undefined){
                lhp_deepcopy1(change_obj[last_path],JSON.parse(JSON.stringify(data)));
            }else{
                change_obj[last_path]=JSON.parse(JSON.stringify(data));
            }
        }
        // console.log("path",path)
        // console.log("_this.$set(change_obj,last_path,data)",change_obj,last_path,data)
        // lhp_deepcopy1(change_obj,JSON.parse(JSON.stringify(data)));
        //类型为删除
        }else if(data_type=="delete"){
            let change_obj=_this.data;
            let father_idx=null;
            let father_obj=null;
            if (path.indexOf(".") !== -1){
                let path_lst=path.split(".");
                if (path_lst.length<=1){console.log("delete异常 数量小于等于1");
return}
                for (let i=0;i<path_lst.length-1;i++){father_obj=change_obj;father_idx=path_lst[i];change_obj=change_obj[path_lst[i]];}
                let last_idx=path_lst[path_lst.length-1];
                // let new_data=JSON.parse(JSON.stringify(change_obj));
                if(typeof change_obj =="object") {  
                    if (Array.isArray(new_data)){
                        change_obj.splice(last_idx,1);
    
                    }else{
                        delete change_obj[last_idx];
                    }
            }}else{console.log("delete异常 数量小于2");
return}
    
            
    //类型为清空数据
    }else if(data_type=="clear"){
        let change_obj=_this.data;
        let last_key=null;
        if (path.indexOf(".") !== -1){
            let path_lst=path.split(".");
            for (let i=0;i<path_lst.length-1;i++){change_obj=change_obj[path_lst[i]]}
            last_key=path_lst[path_lst.length-1];
        }else{
            last_key=path;
        
        }
        let temp_val=change_obj[last_key]
    switch (typeof temp_val) {  
            case 'object':  
                // 注意：这里会匹配到null，因为null也是object类型  
                // 需要额外检查是否为null  
                if (temp_val === null) {  
                    change_obj[last_key] = null; // 或者你可以将null也设置为{}  
                } else if (Array.isArray(temp_val)) {  
                    change_obj[last_key] = [];  
                } else {  
                    change_obj[last_key] = {};  
                }  
                break;  
            case 'string':  
            change_obj[last_key] = '';  
                break;  
            case 'number':  
            change_obj[last_key] = 0;  
                break;  
            case 'boolean':  
            change_obj[last_key] = false;  
                break;  
    
    }
    
    
    }else if(data_type=='insert'){
        // let before_idx=obj_.before_idx;
        let change_obj=_this.data;
        // let last_path=null;
        // console.log("insert检查-1 obj_",obj_)
        // console.log("insert检查 前data",JSON.parse(JSON.stringify(_this.data.data)))
        if (path.indexOf(".") !== -1){
            let path_lst=path.split(".");
            for (let i=0;i<path_lst.length-1;i++){change_obj=change_obj[path_lst[i]]}
            last_path=path_lst[path_lst.length-1];
        }else{last_path=path}
        change_obj[last_path]=JSON.parse(JSON.stringify(data));
        //类型为删除
        }
    }
    //注册全局配置对象   register({"type":"try1","func":"要运行","param_path":xx.xx.xx,"recv_func":func})
    //     type:'try1',//首次执行报错跳过，后续再执行如果报错就删除当前对象
    //     type:'try2',//执行后如果报错就删除对象
    //     type:'try3',//报错不删除对象
    //     func:'',//要运行的函数名称
    //     check_param_path:'',//要检查的数据有变动的索引  如{a:{b:1}}变为{a:{b:2}} 这里值就为a.b
    //     recv_func:'' //向服务器更新数据的请求回调函数
    // 注册后 获得主动获取数据的函数
    // get_data(now_data) 主动获取注册路径的数据 now_data为当前数据
    _this.register=null
    // 注册更新
    // 当数据更新、初始化时 会判断目标路径的值的md5是否产生变化 产生变化则 将变化后的数据传入回调函数中
    _this.match_obj=function(obj){
        for(let i=0;i<_this.objs.length;i++){
            if(_this.objs[i]==obj){return i}
        }
    }
    _this.register=function(obj_data){
        // obj_data={
        //   _this:组件库_主侧栏.return_this(),//vue对象
        //   other_callback:{},//其他监听回调
        //   path:'template_config',//注册路径 /将此数据绑定到组件上
        //   type:"try3", // 报错不删除此注册[运行 func报错时不直接删除该注册对象]
        //   vname:"data",// 将接收的的完整数据保存到   vue对象.data[vname]
        //   func:function(){//将接收的的完整数据保存到   vue对象.data[vname]后 要执行的函数

        //   }
        // }   
        let func_=obj_data.func;
        let recv_data_name=obj_data.vname;
        let var_name=obj_data._this.data.var_name;
        obj_data.run_func1=function(obj_){
            // try{_this.lhp_set1(obj_);}catch (err){console.log("更新数据时运行run_func1函数出错1",err.stack)}
            try{func_(obj_);}catch (err){console.log("更新数据时运行run_func1函数出错2",err.stack);
}
        }
        obj_data.run_func2=function(obj_){
            // try{
                _this.lhp_vue_set(obj_);
            // }catch (err){
            //     console.log("更新数据时运行run_func2函数出错1",err.stack);
            // try{_this.lhp_vue_set(obj_);}catch (err){console.log("更新数据时运行run_func2函数出错1",err.stack);
// }
            try{func_(obj_);}catch (err){console.log("更新数据时运行run_func2函数出错2",err.stack);
}
        }
        obj_data.func=function(obj){
            _this.data.test_flag=true;
            _this.log_print("【",var_name,obj_data._this,"】","传参数据2:",obj);
            _this.log_print("【",var_name,obj_data._this,"】","调用回调函数")
            let path=obj.path;//更新数据的路径
            let data_type=obj.data_type;
            let data=obj.data;
            if(path==''){path=recv_data_name}else{path=recv_data_name+'.'+path}
            log_print("【",var_name,obj_data._this,"】","更新数据和路径:",path,data);
            let ooobj=JSON.parse(JSON.stringify(obj));
            ooobj._this=obj_data._this;
            ooobj.path=path;
            // ooobj._this=obj_data._this;
            // let ooobj={data_type:data_type,_this:,path:,data:data,before_idx:obj.before_idx,type:obj.type};
            if(obj_data.add_time_func){
                if(obj_data.lhp_set1){
                    obj_data.add_time_func({
                        func:obj_data.run_func1,
                        params:ooobj
                    })
                }else{
                    obj_data.add_time_func({
                        func:obj_data.run_func2,
                        params:ooobj
                    })
                }
            }else{
                if (obj_data.lhp_set1){
                    obj_data.run_func1(ooobj);
                }else{
                    obj_data.run_func2(ooobj);
                }
            }
        }
        obj_data.md5={};

        _this.objs.push(obj_data);
        _this.log_print("【",var_name,obj_data._this,"】","注册中:",)
        
        //主动获取注册路径的数据
        let get_data=function(){
            _this.log_print("【",var_name,obj_data._this,"】","初始化数据:2",);
            if(Object.keys(_this.data).length==0){return}//如果data没有数据 则之间跳过执行内容
            // let now_md5=md5(JSON.stringify(now_data));//获取当前的md5
            let path2=obj_data.path;
            
            _this.log_print("【",var_name,obj_data._this,"】","初始化数据:3",path2,);
            let temp_val1=_this.data,temp_val2=[];
            if(path2!=''){temp_val2=path2.split(".");}
            _this.log_print("【",var_name,obj_data._this,"】","初始化数据:4",path2,);
            for(let j=0;j<temp_val2.length;j++){temp_val1=temp_val1[temp_val2[j]]}
            _this.log_print("【",var_name,obj_data._this,"】","初始化数据:5",path2,);
            // let new_md5=md5(JSON.stringify(temp_val1));//获取最新的md5
            //md5不同 则直接更新数据
            // if (!(new_md5===now_md5)){
                try{obj_data.func({path:'',data:temp_val1,data_type:"postput",type:"change_data"})}
                catch(err){
                    _this.log_print(err)
                    let del_idx=null;
                    if (obj_data.type=="try1" || obj_data.type=="try2"){del_idx=_this.match_obj(obj_data);}
                    if(obj_data["error_count"]===undefined){obj_data["error_count"]=1;}
                    else{obj_data["error_count"]++;}
                    if (obj_data.type=='try1'&&obj_data["error_count"]>1){
                        _this.objs.slice(del_idx,1);}
                    else if (obj_data.type=='try2'){_this.objs.slice(del_idx,1);}
                }
                if(obj_data._this.data.test_flag==true){_this.log_print("初始化数据:6")}
            // }
        }
        _this.log_print("【",var_name,obj_data._this,"】","注册-开始 获取初始化数据",);
        get_data();
        _this.log_print("【",var_name,obj_data._this,"】","注册-结束 获取初始化数据",);
        return get_data
    }  
//向服务器更新数据 obj={"path:"xx.xx.xx","data":"data"} path为要更新的完整路径
    _this.update=function(update_obj){
        // update_obj.params=_this.return_params();//添加附带参数如账号信息
        update_obj.params={};//添加附带参数如账号信息
        update_obj.type="change_data";//表示更新数据
        update_obj.template_name=_this.template_name
        
        for(let i=0;i<_this.add_params_func_lst.length;i++){
            lhp_deepcopy1(update_obj.params,lhp_run_func(_this.add_params_func_lst[i]))
        }
        _this.ws.send(JSON.stringify(update_obj));//向服务器发送更新数据请求
    }
    _this.get_all=function(){
        _this.log_print("开始获取服务器所有数据")
        let params={};//添加附带参数如账号信息
        for(let i=0;i<_this.add_params_func_lst.length;i++){
            lhp_deepcopy1(params,lhp_run_func(_this.add_params_func_lst[i]))
        }
        _this.ws.send(JSON.stringify({template_name:_this.template_name,params:params,"type":"regist",path:params.path}));
    }
    }
    

function up_ws_class2(add_params_func_lst) {  
let _this=this;
//创建对象
_this.update_obj=new up_ws_class1();
_this.update_obj.add_params_func_lst=add_params_func_lst;
_this.connect=async function(){
    console.log("开始连接服务器")
    await _this.update_obj.connect_socket();//连接服务器的websocket 连接成功执行回调函数
    _this.更新=function(obj){_this.update_obj.update(obj)}
    _this.注册=function(obj){console.log("开始注册：",_this.update_obj,_this.update_obj.register);_this.update_obj.register(obj);
}
    _this.初始化=function(){_this.update_obj.get_all()}
    console.log("连接服务器完成");
    console.log(`更新:`,_this.更新)
    console.log(`注册:`,_this.注册)
    console.log(`初始化:`,_this.初始化)
}
//开始连接服务器

//等待服务器连接成功
// while(1){
//     if(_this.update_obj.connect_flag){
//         console.log("websocket连接成功!");
//         _this.更新=function(obj){_this.update_obj.update(obj)}
//         _this.注册=function(obj){console.log("开始注册：",_this.update_obj,_this.update_obj.register);_this.update_obj.register(obj);
//}
//         _this.初始化=function(){_this.update_obj.get_all()}
//         break}
// }
}

//通过路由获取当前项目  所在的 用户id  项目目录  项目id
function getQueryParams() {  
    const queryParams = {};  
    const urlParams = new URLSearchParams(window.location.search);  
    for (const [key, value] of urlParams.entries()) {  
        queryParams[key] = value;  
    }  
    queryParams.regist_type="project"//配置类型 为 项目配置
    return queryParams;  
}  
async function time_sleep(sleep_time=2000) {
    return new Promise((resolve) => {
      setTimeout(() => {
        resolve('异步操作完成');
      }, sleep_time);
    });
  }
// user_id=str(params_.get("user_id"))
// project_dir=str(params_.get("project_dir"))
// project_id=str(params_.get("project_id"))
// 全局配置对象=new up_ws_class2(['getQueryParams']);

// 使用示例  
// (async () => {  
    
//     //初始化全局配置对象
//     window.全局配置对象 = new up_ws_class2(['getQueryParams']); 
//     //打开日志提示 
//     全局配置对象.log_flag=true;
//     //等待 建立websocket连接完成
//     await 全局配置对象.connect();
//     //等待连接完成
//     while(1){await time_sleep(0.1);console.log("连接中");
//if(全局配置对象.update_obj.connect_flag==true){break;}}
//     //获取所有配置
//     全局配置对象.初始化();
//     //等待获取所有配置完成
//     while(1){await time_sleep(0.1);console.log("获取配置中");if(全局配置对象.update_obj.get_all_flag==true){break;}}
//     //打印测试
//     console.log("全局配置对象.update_obj.data",全局配置对象.update_obj.data);

//   })();


//设置当前选择的流程图
//建立连接线 -呼起 输出参数名 和 输入参数名
//创建组件
//绘制当前流程的界面
///---------------绘制连接线的函数-------------------//

window.a_1_0_4_1_1_line_dct={};
window.a_1_0_4_1_1_line_add=function(obj){
  if(window.a_1_0_4_1_1_line_dct[obj.key]){return}
let father_dom=obj.father_dom||obj._this.$refs[obj.father_ref];
//新建一个dom
let new_dom=document.createElement('a_1_0_4_1_1_line');
//设置dom属性 ref值为ref_obj
new_dom.setAttribute('ref','ref_obj');
//设置vue
let vue_dct={'el':new_dom,data:{true:true,false:false,null:null}};
//设置vue传入参数
new_dom.setAttribute(':deepcopy_data',"deepcopy_data");vue_dct.data.deepcopy_data={key:obj.key,father_data:obj.father_data,xy:JSON.stringify(obj.xy)};
//插入dom
father_dom.appendChild(new_dom);  
//渲染vue组件
let new_vue=new Vue(vue_dct);
//获取到刚才渲染的vue对象
let new_vue2=new_vue.$refs.ref_obj;
// new_vue2.data=
//加入快速访问中
if(obj.key){window.a_1_0_4_1_1_line_dct[obj.key]={'dom':new_dom,"vue":new_vue2,'father_dom':father_dom}}

}

window.a_1_0_4_1_1_line_del=function(key){
window.a_1_0_4_1_1_line_dct[key].father_dom.removeChild(window.a_1_0_4_1_1_line_dct[key].vue.$el);
delete window.a_1_0_4_1_1_line_dct[key];
}
window.a_1_0_4_1_1_line_clear=function(){
  window.a_1_0_4_1_1_line_dct={};
}
Vue.component2('a_1_0_4_1_1_line', {  
    template: `
       
   <div :refresh="refresh"
        @mousedown="mouse_down2"
        @mouseup="mouse_up2"
        :class="{
        'a_1_0_4_1_1_line_hover':data.true,
        'a_1_0_4_1_1_click_line':data.line_flag,
        'a_1_0_4_1_1_line_color':!data.line_flag
        }"
   >

        <svg v-if='data.line1_flag' :style="data.line1"
            class="a_1_0_4_1_1_b2" stroke-width="6">
                <path :d="data.line1_d" 
                    stroke="#0096f2"fill="#0096f2" stroke-width="6">
                </path>
        </svg>
        
        <svg v-if='data.line2_flag':style="data.line2"
            class="a_1_0_4_1_1_b2" stroke-width="6">
                <path :d="data.line2_d" 
                    stroke="#0096f2"fill="#0096f2" stroke-width="6">
                </path>
        </svg>
        
        <svg v-if='data.line3_flag' :style="data.line3"  
            class="a_1_0_4_1_1_b2" stroke-width="6">
                <path :d="data.line3_d" 
                    stroke="#0096f2"fill="#0096f2" stroke-width="6">
                </path>
        </svg>
        
        <svg v-if='data.line4_flag' :style="data.line4"
            class="a_1_0_4_1_1_b2" stroke-width="6">
                <path :d="data.line4_d" 
                    stroke="#0096f2"fill="#0096f2" stroke-width="6">
                </path>
        </svg>
        <svg v-if='data.line5_flag' :style="data.line5"
            class="a_1_0_4_1_1_b2" stroke-width="6">
                <path :d="data.line5_d" 
                    stroke="#0096f2"fill="#0096f2" stroke-width="6">
                </path>
        </svg>
    </div>
`,
data(){
    return{
        show_flag:true,
        refresh:'1',
        lefttop:'color:red',
        data:{
          line_flag:false,
          true:true,
            xy:'',
            line1_flag:true,
            line2_flag:false,
            line3_flag:false,
            line4_flag:false,
            line5_flag:false,
            line1:'',
            line2:'',
            line3:'',
            line4:'',
            line5:'',
            line1_d:'',
            line2_d:'',
            line3_d:'',
            line4_d:'',
            line5_d:'',
        }
    }
},
watch:{
    'data.xy':function(e){
        e=JSON.parse(e);
        this.set_line2(e);
    },
},
methods:{
  select_line:function(){
this.data.father_data.选择连线(this.data.key);
  },
  
  mouse_up2:function(event){
    //右击弹窗
    if ( this.button_2_flag){
      if(this.button_2.x==event.clientX && this.button_2.y==event.clientY){

        this.click(event);
      }
    }
    else if(this.button_1_flag){
      if(this.button_1.x==event.clientX && this.button_1.y==event.clientY){
        this.select_line();//选择连线
      }
    }
},
  mouse_down2:function(event){
    if (event.button === 2) {
      // 如果是右键，阻止进一步处理
      this.button_2={'x':event.clientX,'y':event.clientY}
      this.button_2_flag=true;
      this.button_1_flag=false;
      return;
  }
  this.button_2_flag=false;
  this.button_1_flag=true;
  this.button_1={'x':event.clientX,'y':event.clientY}
  this.button_2=null;
},
    set_line:function(dct){
      let x_offset=Math.abs(dct.x1-dct.x2);
      //如果end在start正下方
      if (x_offset<5 && dct.y2>dct.y1){return 0}
      //如果end在start左下方
      else if(dct.x1>=dct.x2 && dct.y2>dct.y1){return 1}
      //如果end在start右下方
      else if(dct.x1<=dct.x2 && dct.y2>dct.y1){return 2}
      //如果end在start上方
      else if(x_offset<5 && dct.y2<=dct.y1){return 3}
      //如果end在start左上方
      else if(dct.x1>=dct.x2 && dct.y2<=dct.y1){return 4}
      //如果end在start右上方
      else if(dct.x1<=dct.x2&& dct.y2<=dct.y1){return 5}
      else if((dct.x1==dct.x2) &&(dct.y1==dct.y2)){return 0}
    },
    
    set_line2:function(dct){
        let x1=dct.x1,y1=dct.y1,x2=dct.x2,y2=dct.y2;
        let k=this.set_line(dct);
        //如果end在start正下方
        if       (k==0){
            this.data.line1=`left: ${x1+4.5}px;top:${y1+1+4}px;height: ${y2-y1+5}px;width:${3}px;`;
            this.data.line1_d="M 0 0 L 0 "+(y2-y1)+" ";
            this.data.line2_flag=false;
            this.data.line3_flag=false;
            this.data.line4_flag=false;
            this.data.line5_flag=false;
            this.data.refresh();
        //如果end在start左下方
        }else if(k==1){
            this.data.line1=`left: ${x1+4.5}px;top:${y1+1+4}px;height: ${(y2-y1)/2+5}px;width:${3}px;`;
            // this.data.line2=`left: ${x2+4.5}px;top:${y1+(y2-y1)/2+5}px;height: ${3}px;width:${x1-x2+33}px;cursor:s-resize;`;
            this.data.line2=`left: ${x2+4.5}px;top:${y1+(y2-y1)/2+5}px;height: ${3}px;width:${x1-x2+33}px;`;
            this.data.line3=`left: ${x2+4.5}px;top:${y1+(y2-y1)/2+5}px;height: ${(y2-y1)/2+5}px;width:${3}px;`;
            this.data.line1_d="M 0 0 L 0 "+((y2-y1)/2+2)+" ";
            this.data.line2_d=`M 0 0 L ${x1-x2+3} 0`;
            this.data.line3_d="M 0 0 L 0 "+((y2-y1)/2+7)+" ";
            this.data.line2_flag=true;
            this.data.line3_flag=true;
            this.data.line4_flag=false;
            this.data.line5_flag=false;
            this.data.refresh();
        //如果end在start右下方
        }else if(k==2){
            this.data.line1=`left: ${x1+4.5}px;top:${y1+1+4}px;height: ${(y2-y1)/2+5}px;width:${3}px;`;
            // this.data.line2=`left: ${x1+4.5}px;top:${y1+(y2-y1)/2+5}px;height: ${3}px;width:${x2-x1+5}px;cursor:s-resize;`;
            this.data.line2=`left: ${x1+4.5}px;top:${y1+(y2-y1)/2+5}px;height: ${3}px;width:${x2-x1+5}px;`;
            this.data.line3=`left: ${x2+4.5}px;top:${y1+(y2-y1)/2+5}px;height: ${(y2-y1)/2+5}px;width:${3}px;`;
            this.data.line1_d="M 0 0 L 0 "+((y2-y1)/2+2)+" ";
            this.data.line2_d=`M 0 0 L ${x2-x1+3} 0`;
            this.data.line3_d="M 0 0 L 0 "+((y2-y1)/2+7)+" ";
            this.data.line2_flag=true;
            this.data.line3_flag=true;
            this.data.line4_flag=false;
            this.data.line5_flag=false;
            this.data.refresh();
        //如果end在start上方
        }else if(k==3){
            this.data.line1=`left: ${x1+4.5}px;top:${y2-35}px;height: ${(y1-y2)+10+70}px;width:${3}px;`;
            this.data.line1_d=`M 0 0 L 0 ${y1-y2+70}`;
            this.data.line2_flag=false;
            this.data.line3_flag=false;
            this.data.line4_flag=false;
            this.data.line5_flag=false;
            this.data.refresh();
        //如果end在start左上方
        }else if(k==4){
            this.data.line1=`left: ${x1+4.5}px;top:${y1+1+4}px;height: ${37}px;width:${3}px;`;
            this.data.line2=`left: ${x1-(x1-x2)/2+4.5}px;top:${y1+35}px;height: ${3}px;width:${(x1-x2)/2+7}px;`;
            // this.data.line3=`left: ${x1-(x1-x2)/2+4.5}px;top:${y2-35}px;height: ${70+y1-y2}px;width:${10}px;cursor:w-resize;`;
            this.data.line3=`left: ${x1-(x1-x2)/2+4.5}px;top:${y2-35}px;height: ${70+y1-y2}px;width:${10}px;`;
            this.data.line4=`left: ${x2+4.5}px;top:${y2-35}px;height: ${3}px;width:${(x1-x2)/2+7}px;`;
            this.data.line5=`left: ${x2+4.5}px;top:${y2-35}px;height: ${55}px;width:${3}px;`;
            this.data.line1_d="M 0 0 L 0 32";
            this.data.line2_d=`M 0 0 L ${(x1-x2)/2+3} 0`;
            this.data.line3_d=`M 0 0 L 0 ${y1-y2+77}`;
            this.data.line4_d=`M 0 0 L ${(x1-x2)/2+3} 0`;
            this.data.line5_d="M 0 0 L 0 44";
            this.data.line2_flag=true;
            this.data.line3_flag=true;
            this.data.line4_flag=true;
            this.data.line5_flag=true;
            this.data.refresh();
        //如果end在start右上方
        }else if(k==5){
            this.data.line1=`left: ${x1+4.5}px;top:${y1+1+4}px;height: ${37}px;width:${3}px;`;
            this.data.line2=`left: ${x1+4.5}px;top:${y1+35}px;height: ${3}px;width:${(x2-x1)/2+7}px;`;
            // this.data.line3=`left: ${x1+(x2-x1)/2+4.5}px;top:${y2-35}px;height: ${70+y1-y2}px;width:${10}px;cursor:w-resize;`;
            this.data.line3=`left: ${x1+(x2-x1)/2+4.5}px;top:${y2-35}px;height: ${70+y1-y2}px;width:${10}px;`;
            this.data.line4=`left: ${x1+(x2-x1)/2+4.5}px;top:${y2-35}px;height: ${3}px;width:${(x2-x1)/2+7}px;`;
            this.data.line5=`left: ${x2+4.5}px;top:${y2-35}px;height: ${55}px;width:${3}px;`;
            this.data.line1_d="M 0 0 L 0 32";
            this.data.line2_d=`M 0 0 L ${(x2-x1)/2+3} 0`;
            this.data.line3_d=`M 0 0 L 0 ${y1-y2+77}`;
            this.data.line4_d=`M 0 0 L ${(x2-x1)/2+3} 0`;
            this.data.line5_d="M 0 0 L 0 44";
            this.data.line2_flag=true;
            this.data.line3_flag=true;
            this.data.line4_flag=true;
            this.data.line5_flag=true;
            this.data.refresh();
        }
    },
    click:function(event){
      
    let _this=this;
    a_1_0_4_1_1_show_menu({
      event:event,
      menu_dct:{
        1:{
          text:"删除",
          click:function(event){
            _this.data.father_data.删除连线(_this.data.key);
          }
        }
      }
    })
  }
},

mounted:function(){
_this.data.refresh=function(){_this.refresh='2'?'1':'2'}
_this.data.menu_dct=_this.deepcopy_data.menu_dct;_this.data.refresh();
}

})

//----------------绘制连接线的函数end---------------//
Vue.component2('a_1_0_4_1_1_input_range',{
  template:`
  <div 
      @mouseenter="handleMouseEnter"  
      @mouseleave="handleMouseLeave">


  <input ref="range"class="a_1_0_4_1_1inputrange"type="range" min="1" max="200" step="1" value="100" @input="showValue">


        <div class="a_1_0_4_1_1_sub_menu" :style="hovertext_style">
            <div class="a_1_0_4_1_1_sub_menu_item" ref="text">
               缩放比:100%
            </div>
        </div>


  </div>
  `, 
  data() {
      return {
        refresh:"1",
        show_flag:true,
        hover_flag:false,
        style:{},
        hovertext_style:"top:-100;visibility:hidden;",
        style2:"",
        data:{
            test:false,
            val:100,
            add_show:true,
            callback:null,
            icon_class:"",//图标类
            icon_color:"rgba(231, 231, 231, 0.6)",//图标颜色
            background:"#212121",//背景颜色
            hovercolor:"#ffffff",//高亮颜色
            hovertext:"缩放比:100%",//移动到位后的提示文字
            click:null,//点击触发函数
        }
      };
  },
  watch:{
  },
  methods:{accumulateParentOffsets:function (targetElement) {  
    let currentElement = targetElement;  
    let totalLeft = 0;  
    let totalTop = 0;  
  
    while (currentElement && currentElement.nodeType === Node.ELEMENT_NODE) {  
        const computedStyle = window.getComputedStyle(currentElement);  
          
        if (computedStyle.position === 'relative') {  
            // 注意：offsetLeft 和 offsetTop 给出的是相对于最近的定位祖先的偏移  
            // 在这里，我们假设没有其他的定位祖先（或它们不影响我们的计算）  
            // 因为我们只关心 relative 定位的父元素  
            totalLeft += currentElement.offsetLeft;  
            totalTop += currentElement.offsetTop;  
        }  
  
        currentElement = currentElement.parentElement;  
    }  
  
    return { left: totalLeft, top: totalTop };  
} ,
    showValue(event){
      this.data.val=event.target.value;
      this.$refs.text.innerHTML="缩放比:"+this.data.val+'%';
      try{this.data.callback(this.data.val)}catch{};
    },
    get_rect(){
      let rect=this.$refs.range.getBoundingClientRect();

  // console.log('Top:', rect.top);
  // console.log('Left:', rect.left);
  // console.log('Bottom:', rect.bottom);
  // console.log('Right:', rect.right);
  // console.log('Width:', rect.width);
  // console.log('Height:', rect.height);
  return rect
    },
    handleMouseEnter(){  
        if(this.hover_flag==false){
            this.hover_flag=true; 
            let rect=this.get_rect();
            let oobj=this.accumulateParentOffsets(this.$refs.range);
            this.hovertext_style=`top:${rect.top-oobj.top-40};left:${rect.left-oobj.left}`;
        }
      },  
      handleMouseLeave() {  
        if(this.hover_flag==true){
            this.hover_flag=false; 
            this.hovertext_style="top:-100;visibility:hidden;";
        }
      } ,
  },
  mounted:function(){
} }
);


Vue.component2('a_1_0_4_1_1button',{
  template:`
  <div style="padding:7.5px"
      @mouseenter="handleMouseEnter"  
      @mouseleave="handleMouseLeave">

      <button ref="range" class="a_1_0_4_1_1button" @click="change_val">{{data.hovertext}}</button>

        <div class="a_1_0_4_1_1_sub_menu" :style="hovertext_style">
            <div class="a_1_0_4_1_1_sub_menu_item" ref="text">
              {{data.name}}:{{data.hovertext}}
            </div>
        </div>


  </div>
  `, 
  data() {
      return {
        refresh:"1",
        show_flag:true,
        hover_flag:false,
        style:{},
        hovertext_style:"top:-100;visibility:hidden;",
        style2:"",
        data:{
            test:false,
            val:100,
            add_show:true,
            icon_class:"",//图标类
            icon_color:"rgba(231, 231, 231, 0.6)",//图标颜色
            background:"#212121",//背景颜色
            hovercolor:"#ffffff",//高亮颜色
            name:"宽度:",
            hovertext:"2000px",//移动到位后的提示文字
            click:null,//点击触发函数
        }
      };
  },
  watch:{
  },
  methods:{
    
    change_val:function(){
      let _this=this;
      _this.$prompt('修改'+this.data.name, '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
      }).then(({ value }) => {
        try{_this.showValue(value);}
        catch (err){
            console.log("出错..",err)
        }
        
      }).catch(() => {
        _this.$message({
          type: 'info',
          message: '取消输入'
        });       
      });
    },
    
    
    accumulateParentOffsets:function (targetElement) {  
    let currentElement = targetElement;  
    let totalLeft = 0;  
    let totalTop = 0;  
  
    while (currentElement && currentElement.nodeType === Node.ELEMENT_NODE) {  
        const computedStyle = window.getComputedStyle(currentElement);  
          
        if (computedStyle.position === 'relative') {  
            // 注意：offsetLeft 和 offsetTop 给出的是相对于最近的定位祖先的偏移  
            // 在这里，我们假设没有其他的定位祖先（或它们不影响我们的计算）  
            // 因为我们只关心 relative 定位的父元素  
            totalLeft += currentElement.offsetLeft;  
            totalTop += currentElement.offsetTop;  
        }  
  
        currentElement = currentElement.parentElement;  
    }  
  
    return { left: totalLeft, top: totalTop };  
} ,
    showValue(val){
      this.data.val=val;
      this.data.hovertext=val+'px';
      try{this.data.callback(this.data.val)}catch{};
    },
    get_rect(){
      let rect=this.$refs.range.getBoundingClientRect();

  // console.log('Top:', rect.top);
  // console.log('Left:', rect.left);
  // console.log('Bottom:', rect.bottom);
  // console.log('Right:', rect.right);
  // console.log('Width:', rect.width);
  // console.log('Height:', rect.height);
      return rect
    },
    handleMouseEnter(){  
        if(this.hover_flag==false){
            this.hover_flag=true; 
            let rect=this.get_rect();
            let oobj=this.accumulateParentOffsets(this.$refs.range);
            this.hovertext_style=`top:${rect.top-oobj.top-40};left:${rect.left-oobj.left}`;
        }
      },  
      handleMouseLeave() {  
        if(this.hover_flag==true){
            this.hover_flag=false; 
            this.hovertext_style="top:-100;visibility:hidden;";
        }
      } ,
  },
  mounted:function(){
} }
);


Vue.component2('a_1_0_4_1_1button2',{
  template:`
  <div >

      <button ref="range" class="a_1_0_4_1_1button" @click="click_func">{{data.name}}</button>



  </div>
  `, 
  data() {
      return {
        data:{
          click:null,
            name:"运行控制",
        }
      };
  },
  watch:{
  },
  methods:{
    click_func:function(){
      let _this=this;
      try{this.data.click();}catch{}
    }
  },
  mounted:function(){
} }
);


function a_1_0_4_1_1_get_div() { 
	let res=document.getElementById("a_1_0_4_1_1");
    if(!res){
    res = document.createElement('div');  
    res.id = 'a_1_0_4_1_1'; // 为div设置一个唯一的ID  
    
    res.style.visibility = 'hidden'; // 初始设置为隐藏，但不影响尺寸计算  
    res.style.position = 'absolute'; // 设置为绝对定位，避免影响其他元素布局（可选） 
    res.style.display = 'none'; //隐藏 
    document.body.appendChild(res);
    }
      
    return res;  
}  
  
// 通过传参设置div的样式，并输出div的高度和宽度  
function a_1_0_4_1_1_get_wh(obj) {  
    let styles=obj.styles||{};
    let class_=obj.class||'';
    let context=obj.context||'';
    let res=a_1_0_4_1_1_get_div();
    
    // 清除除visibility和position之外的所有样式  
    for (let style in res.style) {  
        if (style !== 'visibility' && style !== 'position' ) { 
            res.style.removeProperty(style);  
        }  
    }  
    res.style.visibility = 'hidden'; // 初始设置为隐藏，但不影响尺寸计算  
    res.style.position = 'absolute'; // 设置为绝对定位，避免影响其他元素布局（可选） 
    // 设置div的样式  
    for (let property in styles) {  
        if (styles.hasOwnProperty(property)) {  
            res.style[property] = styles[property];  
        }  
    }  
    res.className=class_;
    res.textContent=context;
    // 获取div的高度和宽度（包括padding和border，但不包括margin）  
    let height = res.offsetHeight;  
    let width = res.offsetWidth;  
  
    res.style.display = 'none'; //隐藏
    // 输出高度和宽度  
    console.log(`Div的高度: ${height}px`);  
    console.log(`Div的宽度: ${width}px`);  
  
    return { height:height, width:width }; // 返回高度和宽度（可选）  
}  
  
// 使用示例  
// a_1_0_4_1_1_get_wh({
// styles:{
//     backgroundColor: 'lightblue',  
//     border: '1px solid black',  
//     padding: '10px'
// },
// context:'33333',
// class:'ddd'
// });
////----------------------绘制右击菜单---------start------------/////////
window.a_1_0_4_1_1_dom=null;//表示菜单的dom
window.a_1_0_4_1_1_vue=null;//表示菜单的dom
window.a_1_0_4_1_1_show_menu=function(obj){

let x=null;
let y=null;
if(obj.event){
    x=obj.event.clientX;
    y=obj.event.clientY;
}else{
    x=obj.x;
    y=obj.y;
}
let deepcopy_data={"menu_dct":obj.menu_dct,'keys':Object.keys(obj.menu_dct).sort(),x:x,y:y}
//如果菜单不存在则创建一个菜单
if(!a_1_0_4_1_1_dom){
let new_dom=document.createElement('a_1_0_4_1_1_menu');
//设置dom属性 ref值为ref_obj
new_dom.setAttribute('ref','ref_obj');
new_dom.setAttribute(':deepcopy_data','deepcopy_data');
//设置vue
let vue_dct={'el':new_dom,data:{true:true,false:false,null:null,deepcopy_data:deepcopy_data}};
// 将这个 div 添加到 document.documentElement（即 <html> 元素）  
document.documentElement.appendChild(new_dom);
//渲染vue组件
window.a_1_0_4_1_1_vue=new Vue(vue_dct);
window.a_1_0_4_1_1_dom=new_dom;

document.addEventListener('click', function(event) {
  // Check if the clicked element is not doma and not a descendant of doma
  if (!window.a_1_0_4_1_1_vue.$refs.ref_obj.$el.contains(event.target)) {
      window.a_1_0_4_1_1_vue.$refs.ref_obj.show_flag=false;
  }
});
}else{
    window.a_1_0_4_1_1_vue.$refs.ref_obj.data.keys=Object.keys(obj.menu_dct).sort();
    window.a_1_0_4_1_1_vue.$refs.ref_obj.data.menu_dct=obj.menu_dct;
    window.a_1_0_4_1_1_vue.$refs.ref_obj.data.x=x;
    window.a_1_0_4_1_1_vue.$refs.ref_obj.data.y=y;
    window.a_1_0_4_1_1_vue.$refs.ref_obj.data.refresh();
    window.a_1_0_4_1_1_vue.$refs.ref_obj.show_flag=true;

}

}


Vue.component2('a_1_0_4_1_1_menu', {  
    template: `
       
        <div class="a_1_0_4_1_1_sub_menu" :style="lefttop" :key='refresh' v-show='show_flag'>
            <div class="a_1_0_4_1_1_sub_menu_item" ref="text"v-for="(key,indexr) in data.keys" @click="click($event,key)">
                {{data.menu_dct[key].text}}
            </div>
        </div>
`,
data(){
    return{
        show_flag:true,
        refresh:'1',
        lefttop:'color:red',
        data:{
            menu_dct:{
            },
            keys:{},
            x:'33',
            y:'33',
        }
    }
},
watch:{
    
    "data.x":function(e){
        this.lefttop=`left:${this.data.x};top:${this.data.y};`
    },
    "data.y":function(e){
        this.lefttop=`left:${this.data.x};top:${this.data.y};`
    },
},
methods:{
    
    click:function(event,key){
        this.data.menu_dct[key].click(event);
        this.show_flag=false;
    },
},

mounted:function(){
_this.data.refresh=function(){_this.refresh='2'?'1':'2'};
_this.data.keys=_this.deepcopy_data.keys;
_this.data.x=_this.deepcopy_data.x;
_this.data.y=_this.deepcopy_data.y;
_this.data.menu_dct=_this.deepcopy_data.menu_dct;_this.data.refresh();
}

})

// a_1_0_4_1_1_show_menu(
// {
//     menu_dct:{
//         '0':{
//             'text':"删除",
//             'click':function(){console.log("???");
//},
//         },
//         '1':{
//             'text':"查看",
//             'click':function(){console.log("2???");
//},
//         },
//     },
//     x:444,y:444,
// }
// )

// a_1_0_4_1_1_show_menu(
// {
//     menu_dct:{
//         '0':{
//             'text':"3删除",
//             'click':function(){console.log("???");
//},
//         },
//         '1':{
//             'text':"4查看",
//             'click':function(){console.log("2???");
//},
//         },
//     },
//     event:{clientX:333,clientY:555}
// }
// )
////----------------------绘制右击菜单-------end--------------/////////

//-------------------------绘制 组件按钮-------start--------------//
Vue.component2('a_1_0_4_1_1_buttonx', {  
    template: `
        <div  class="a_1_0_4_1_1_class6" :style="lefttop"
        v-if="data.id_"
        @mousedown="mouse_down2"
        @mouseup="mouse_up2"
        :key="refresh"
        >
            <div 
            
        :class="{
        'a_1_0_4_1_1_class1':data.true,
        
        'a_1_0_4_1_1_click_out_button':data.out_flag,
    'a_1_0_4_1_1_click_in_button': data.in_flag,
        }"
            
            >
        
        <span  style="color:#bcbcbc" :key="refresh2">{{data.father.flow_dict[data.id_].name}}</span>



        
        <!-- 入参 上圆 -->
        <svg 
        入参
        class="a_1_0_4_1_1_class2"
        @mousedown="mouse_down__"
        @mouseup="mouse_up1" 
        :style="data.circle_style1"  width="12" height="12">
        <circle cx="6" cy="6" r="4" fill="none" stroke="#FFFFFF" style="" stroke-width="1"></circle></svg>
        
        <!-- 出参 下圆 -->
        <svg 
        出参
        class="a_1_0_4_1_1_class3"
        @mousedown="mouse_down1"
        :style="data.circle_style2" width="12" height="12">
        <circle cx="6" cy="6" r="4" fill="none" stroke="#FFFFFF" style="" stroke-width="1"
        
        ></circle></svg>
        
        <!-- 进程id-->
        <svg 
        进程id
        width="24" height="24"
        
        :class="{
        'a_1_0_4_1_1_class4':data.true,
        
        'a_1_0_4_1_1_success1':data.father.process_dct[data.father.flow_dict[data.id_].process_id],
    'a_1_0_4_1_1_error1': !data.father.process_dct[data.father.flow_dict[data.id_].process_id],
        }"
        
        :style="data.circle_style3">
        <circle cx="12" cy="12" r="8" fill="none" stroke="#FFFFFF" stroke-width="2"></circle>
    
    
        <text x="7" y="17" fill="white" style="font-size: 15px; font-family: Arial;">
{{data.father.flow_dict[data.id_].process_id}}</text> </svg>
    
    <!-- 函数类型  显示tree_type的圈圈0(绿色)表示被动执行的函数(如 def a():return 1) 1(橙色)表示需要触发执行的函数(如接收http请求的函数)-->
    <svg 
    函数类型
    width="24" height="24"
    
    :class="{
        'a_1_0_4_1_1_class5':data.true, 
        'a_1_0_4_1_1_success2': data.father.flow_dict[data.id_].tree_type=='0',
    'a_1_0_4_1_1_error2': data.father.flow_dict[data.id_].tree_type=='1',
    }"
    
    :style="data.circle_style4">
    <circle cx="12" cy="12" r="8" fill="none" stroke="#FFFFFF" stroke-width="2"></circle>
    </svg>
        </div>



        </div>
`,
data(){
    return{
      refresh:'1',
      refresh2:'3',
        lefttop:'',
        data:{
          out_flag:false,
          in_flag:false,
            id_:null,
            father:{},
            true:true,
            process_dct2:{54:"mqtt进程"},
            process_dct:{45:"mqtt进程"},
            process_id:"",
            circle_style1:'',
            circle_style2:'',
            circle_style3:'',
            circle_style4:'',
            circle_style_left:'',
            name:"",
            key:'',
            x:'',
            y:'',
        }
    }
},
watch:{
    "data.x":function(e){
        this.lefttop=`left:${this.data.x};top:${this.data.y};`
    },
    "data.y":function(e){
        this.lefttop=`left:${this.data.x};top:${this.data.y};`
    },
    "data.name":function(e){
        let obj=a_1_0_4_1_1_get_wh({
            'context':this.data.father.flow_dict[this.data.id_].name,
            'class':"a_1_0_4_1_1_class1 ddd"
        });
        let width=obj.width;
        this.data.circle_style1=`left:${width/2-6}px`;
        this.data.circle_style2=`left:${width/2-6}px`;
        this.data.circle_style_left=width/2-6;
    }
},

methods:{
  refresh2_func:function(){
    
    this.refresh2=this.refresh2==='4'?'3':'4'},
  refresh_func:function(){
    
    let obj=a_1_0_4_1_1_get_wh({
      'context':this.data.father.flow_dict[this.data.id_].name,
      'class':"a_1_0_4_1_1_class1 ddd"
  });
  let width=obj.width;
  this.data.circle_style1=`left:${width/2-6}px`;
  this.data.circle_style2=`left:${width/2-6}px`;
  this.data.circle_style_left=width/2-6;
    this.refresh=this.refresh==='2'?'1':'2'},
  return_circle_xy1:function(){
    return {x:this.data.x+this.data.circle_style_left,y:this.data.y-12}
  },
  return_circle_xy2:function(){
    return {x:this.data.x+this.data.circle_style_left,y:this.data.y+24}
  },
  
     mouse_down__:function(event){
      event.stopPropagation();
     },
     mouse_up__:function(event){
      event.stopPropagation();
     },
    mouse_up1:function(event){
      let data=this.data.father_data.全局鼠标操作对象1.get_data({key:"绘制当前连线"})
        try{ if (!data.write_flag){return}}catch{return}
       
      let xy=this.return_circle_xy1();
        console.log("上圆 释放鼠标")
        this.data.father_data.建立连接线({
          key:this.data.key
        });
        event.stopPropagation();
    },
    mouse_down1:function(event){
      let xy=this.return_circle_xy2();
        this.data.father_data.全局鼠标操作对象1.set_data({
          key:"绘制当前连线",
          data:{key:this.data.key,
            x1:xy.x,y1:xy.y,
            write_flag:true
          }
      });
        this.data.father_data.显示当前绘制的连线(event);


        this.data.father_data.全局鼠标操作对象1.set_move({
          key:"绘制当前连线",
          key2:"绘制当前连线move",
          func:this.data.father_data.移动当前绘制的连线,
      });
      this.data.father_data.全局鼠标操作对象1.set_up({
          key:"绘制当前连线",
          key2:"绘制当前连线up",
          func:this.data.father_data.隐藏当前绘制的连线,
      });

        event.stopPropagation();
    },
    mouse_up2:function(event){
      if ( this.button_2_flag){
        if(this.button_2.x==event.clientX && this.button_2.y==event.clientY){
          this.click(event);
        }
      }
      else if(this.button_1_flag){
        if(this.button_1.x==event.clientX && this.button_1.y==event.clientY){
          this.data.father_data.选择组件(this.data.key);
        }
      }
  },
    move_mouse:function(){

    },
    
    mouse_down2:function(event){
      if (event.button === 2) {
        // 如果是右键，阻止进一步处理
        this.button_2={'x':event.clientX,'y':event.clientY}
        this.button_2_flag=true;
        this.button_1_flag=false;
        return;
    }
    this.button_2_flag=false;
    this.button_1_flag=true;
    this.button_1={'x':event.clientX,'y':event.clientY}
    this.button_2=null;
      this.data.father_data.全局鼠标操作对象1.set_move({
        key:"移动后端组件",
        key2:"移动后端组件move",
        func:this.data.father_data.移动后端组件move,
    });
    this.data.father_data.全局鼠标操作对象1.set_up({
        key:"移动后端组件",
        key2:"移动后端组件up",
        func:this.data.father_data.移动后端组件up,
    }); 
    this.data.father_data.全局鼠标操作对象1.set_data({
        key:"移动后端组件",
        data:{key:this.data.key,
          x:this.data.x,y:this.data.y,
          mousex:event.clientX,mousey:event.clientY}
    });
  },
  change_name:function(_this){
    this.$prompt('修改组件名称', '提示', {
      confirmButtonText: '确定',
      cancelButtonText: '取消',
    }).then(({ value }) => {
      
      _this.data.father_data.修改组件名称(_this.data.key,value);
    }).catch(() => {
      this.$message({
        type: 'info',
        message: '取消输入'
      });       
    });
  },
  click:function(event){
    let _this=this;
    a_1_0_4_1_1_show_menu({
      event:event,
      menu_dct:{
        
        0:{
          text:"改名",
          click:function(event){
            _this.change_name(_this);
          }
        },
        1:{
          text:"删除",
          click:function(event){
            _this.data.father_data.删除组件(_this.data.key);
          }
        }
      }
    })
  }
},

mounted:function(){

}

})
window.a_1_0_4_1_1_dom_dct={};
window.a_1_0_4_1_1_add=function(obj){
let father_dom=obj.father_dom||obj._this.$refs[obj.father_ref];
let vue_name=obj.vue_name;
//新建一个dom
let new_dom=document.createElement(vue_name);
//设置dom属性 ref值为ref_obj
new_dom.setAttribute('ref','ref_obj');
//设置vue
let vue_dct={'el':new_dom,data:{true:true,false:false,null:null}};
//设置vue传入参数
if(obj.deepcopy_data){new_dom.setAttribute(':deepcopy_data',"deepcopy_data");vue_dct.data.deepcopy_data=obj.deepcopy_data;}
//插入dom
father_dom.appendChild(new_dom);  
//渲染vue组件
let new_vue=new Vue(vue_dct);
//获取到刚才渲染的vue对象
let new_vue2=new_vue.$refs.ref_obj;
//加入快速访问中
if(obj.key){window.a_1_0_4_1_1_dom_dct[obj.key]={'dom':new_dom,"vue":new_vue2,'father_dom':father_dom}}

}
window.a_1_0_4_1_1_refresh_all=function(){
  for(let k in window.a_1_0_4_1_1_dom_dct){
    window.a_1_0_4_1_1_dom_dct[k].vue.refresh_func();
  }
}
window.a_1_0_4_1_1_del=function(key){
window.a_1_0_4_1_1_dom_dct[key].father_dom.removeChild(window.a_1_0_4_1_1_dom_dct[key].vue.$el);
delete window.a_1_0_4_1_1_dom_dct[key];
}
window.a_1_0_4_1_1_clear=function(){
  window.a_1_0_4_1_1_dom_dct={};
}
//-------------------------绘制 组件按钮-------end--------------//
////如果处于组件拖拽进来的状态
//创建连线
//组件被点击
Vue.component2('a_1_0_4_1_1', {  
    template: `
<div class="a_1_0_4_1_1_parent1" v-show="data.show_flag ">

  <!-- 顶部显示窗口 start -->
    <div class="a_1_0_4_1_1_title">
        <div style="padding-left:20px;color:#bcbcbc">后端流程可视化编辑界面
            <div style="display:inline-block;flex:1;">
                <div style="display:flex;
                    justify-content: flex-end;
                    display: flex;">
                </div>
            </div>
        </div>
    </div>
  <!-- 顶部显示窗口 end -->


<!-- 弹窗部分 start -->
    <!-- 右击组件后的弹窗 -->
    <div class="menu-container" v-show="now_select_temp_menu_flag" >  
      <ul class="menu-list"> 
        <li class="menu-item" @click="del_temp">  
          <span class="icon">❌</span>  
          <span class="text">删除</span>  
        </li>  
      </ul>  
    </div>  

      <!-- 右击连线后的弹窗 -->
    <div class="menu-container" v-show="now_select_line_menu_flag">  
      <ul class="menu-list"> 
        <li class="menu-item"@click="del_line">  
          <span class="icon">❌</span>  
          <span class="text">删除</span>  
        </li>  
      </ul>  
    </div>  
<!-- 弹窗部分 end -->
  <!-- 主要操作窗口 start -->
  <div ref="scroll"class="a_1_0_4_1_1_parent a_1_0_4_1_1scrollbar"style="position: relative;
    background: #282828;"
   
    >
    <div :style="data.write_style"
    class="a_1_0_4_1_1_parent3"
    ref="write_dom"
    @mousemove="mousemove_"  
    @mouseup="mouseup_" 
    @mouseleave="mouseleave_" 
    @mouseenter="mouseenter_"
    >
    </div>
    </div>

  <!-- 主要操作窗口 end -->
  
  <!-- 底部设置窗口 start -->
    <div class="a_1_0_4_1_1_shu_page_info">
    <!-- 设置界面缩放比 start -->
    <a_1_0_4_1_1_input_range  :key="data.scale_key"style="padding:7.5px" :deepcopy_data="data.change_scale_info"></a_1_0_4_1_1_input_range>
    <!-- 设置界面缩放比 end -->

    <!-- 设置界面宽度 start -->
    <a_1_0_4_1_1button  :key="data.width_key" style="padding:7.5px":deepcopy_data="data.change_width_info"></a_1_0_4_1_1button>
    <!-- 设置界面宽度 end -->

    <!-- 设置界面高度 start -->
    <a_1_0_4_1_1button  :key="data.height_key"style="padding:7.5px" :deepcopy_data="data.change_height_info"></a_1_0_4_1_1button>
    <!-- 设置界面高度 end -->

        <div style="height:100%;width:100%;display: inline-block; flex: 1 1 0%;">
            <div style="height:100%;display: flex; justify-content: flex-end;">
                <div style="height:100%;">
                    <div class="a_1_0_4_1_1_icon_class" style="display: inline-block;">
                      <a_1_0_4_1_1button2 style="padding:7.5px" :deepcopy_data="{'name':'运行控制','click':run_flow}"></a_1_0_4_1_1button2>
                    </div>
                </div>
                <div :key="flow_type_key">
                    <div class="a_1_0_4_1_1_icon_class" style="display: inline-block;">
                    <div style="padding:7.5px" >
                        <span>{{flow_type}}</span>
                    </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
  <!-- 底部设置窗口 end -->

    </div>
  `,  
  data:function(){  
  
    return {
      flow_type_key:"ff1",
      flow_type:'未运行',
      now_select_temp_menu_flag:false,
      now_select_line_menu_flag:false,
        data:{
          write_style:"width:2000px;height:2000px;scale:1.0",
          scale:1.0,
          scale_key:"1",
          change_scale_info:{},
          change_width_info:{},
          change_height_info:{},
          width:'2000px',
          width_key:"3",
          height:'2000px',
          height_key:"5",

          key:null,//当前选择的流程
          data:{},
          全局配置对象:null,
          true:true,
          false:false,
          show_flag:false,
          },
        }
    }   , 
    watch:{

    },
  methods: {  
  拖拽进来组件:function(event,info){
    this.data.新增组件(event,info);
  },
  //鼠标按下 触发函数
  mouseup_:function(event,){
    console.log("test mouse up")
    console.log("_this.data.全局鼠标操作对象1 eeee",JSON.parse(JSON.stringify(this.data.全局鼠标操作对象1.up_funcs)))
    if (this.data.全局鼠标操作对象1.up_funcs['拖拽后端组件']){
      this.拖拽进来组件(event,this.data.全局鼠标操作对象1.get_data({"key":'拖拽后端组件'}));
    }
    
    let x=event.clientX;
    let y=event.clientY;
    let relative_leftright=accumulateParentOffsets(this.$refs.write_dom);//累加所有relative 父dom的left和top
    let params={x:x,y:y,relative_leftright:relative_leftright,dom:this.$refs.write_dom};
    try{this.data.move_obj.mouseup(event,params);}catch{}
    
  },
  //鼠标移动 触发函数
  mousemove_:function(event){
    let x=event.clientX;
    let y=event.clientY;
    let relative_leftright=accumulateParentOffsets(this.$refs.write_dom);//累加所有relative 父dom的left和top
    let params={x:x,y:y,relative_leftright:relative_leftright,dom:this.$refs.write_dom};
    try{this.data.move_obj.mousemove(event,params);}catch{}

  },
  //鼠标移入 触发函数
  mouseenter_:function(event,){
    let x=event.clientX;
    let y=event.clientY;
    let relative_leftright=accumulateParentOffsets(this.$refs.write_dom);//累加所有relative 父dom的left和top
    let params={x:x,y:y,relative_leftright:relative_leftright,dom:this.$refs.write_dom};
    try{this.data.move_obj.mouseenter(event,params);}catch{}
  },
  //鼠标离开 触发函数
  mouseleave_:function(event,){
    let x=event.clientX;
    let y=event.clientY;
    let relative_leftright=accumulateParentOffsets(this.$refs.write_dom);//累加所有relative 父dom的left和top
    let params={x:x,y:y,relative_leftright:relative_leftright,dom:this.$refs.write_dom};
    try{this.data.move_obj.mouseleave(event,params);}catch{}

  },
    run_flow:function(){
      let body_data=JSON.parse(JSON.stringify(this.url_params))
      body_data['flow_id']=this.now_select
      try{
        if (this.base_info['run_flag']==true){
        body_data['type']="stop_flow"
        }else{
        body_data['type']="run_flow"
        }
      }
      catch{
        body_data['type']="run_flow"
      }
      this.project_post({body_data:body_data})
    },
    show_tip:function(a,b,c,d,e){
       show_tip(a,b,c,d,e)
    },
    _refresh:function(){
      //更新入参界面小三角数据
      try{
        this.base_info=this.data.flow_chat_config.dict[this.now_select].flow_chat_base_info
        this.flow_dict=this.data.flow_chat_config.dict[this.now_select].flow_chat_use_compontent
        try{
          if (this.base_info['run_flag']==true){
          this.flow_type='运行中'
          }else{
          this.flow_type='未运行'
          }
        }
        catch{
          this.flow_type='未运行'
        }
        
        //快速访问获取到进程名称
        this.process_dct=this.base_info.process_dct
        
        this.process_dct2={}
        for (let kkk in this.process_dct){this.process_dct2[kkk]=kkk}

        this.process_dct2['null']=''
        this.process_dct2['undefined']=''
        //刷新页面
        if (this.refresh.length>10){this.refresh="1"}else{this.refresh=this.refresh+"1"}
        
      }catch{}

    },
    //组件被点击
    temp_click:function(event,info){
      // lhp_run_func(this.___set_now_edit_template,)
      //显示组件面板
      //隐藏连线面板
      this.now_click_line_temp_id1=null
      this.now_click_line_temp_id2=null
      this.now_click_line_key=null;
      this.now_click_temp_id=info.key
      console.log(this.flow_dict[info.key])
      let infoe={"temp_id":info.key}
      lhp_run_func(this.data.___bind_temp_click,infoe)
      let info1={"out_key":null,"out_id":null,"in_id":null,"in_key":null}
      lhp_run_func(this.data.___bind_line_click,info1)
    },
    //连接线被点击
    line_click:function(event,params){
      let out_key=params.out_key;
      let out_id=params.out_id;
      let out_objs=this.flow_dict[out_id].out[out_key];
      let in_id=out_objs.out_id
      let in_key=out_objs.out_key
      this.now_click_line_temp_id1=out_id
      this.now_click_line_temp_id2=in_id
      this.now_click_temp_id=null
      this.now_click_line_key=out_key
      
      let info1={"out_key":out_key,"out_id":out_id,"in_id":in_id,"in_key":in_key}
      lhp_run_func(this.data.___bind_line_click,info1)
      let info2={"temp_id":null}
      lhp_run_func(this.data.___bind_temp_click,info2)
    },
    del_temp:function(event){
      let out_id=this.now_select_temp
      let value=this.flow_dict[out_id];
      let delete1={
        'delete_before':`flow_chat_config.dict.1.dict.${this.now_select}.flow_dict`,
        'lst':[
        ]
      }
      let delete_lst=[delete1]
      let postput={}
      //将绑定在这个组件上的连线全部删除
      //先删除输出连线
      
      for (let out_key in value.out) {  
        delete1.lst.push(`${value.out[out_key].out_id}.in.${value.out[out_key].out_key}`
        ) 

        let ooout_id=value.out[out_key].out_id;
        let out_obj=this.flow_dict[ooout_id].in_kwargs;
        for (let param_key in out_obj){
          if (out_obj[param_key].hasOwnProperty("in_params")&&out_obj[param_key]['in_params'][0]==out_id){
            delete1.lst.push(`${ooout_id}.in_kwargs.${param_key}.in_params`
            )
          }
        }
      }  
      //再删除输入连线
      for (let in_key in value.in) {  
        delete1.lst.push(
         `${value.in[in_key].in_id}.out.${value.in[in_key].in_key}`
        ) 
        let iiin_id=value.in[in_key].in_id;
        let in_obj=this.flow_dict[iiin_id].out_kwargs;
        for (let param_key in in_obj){
          if (in_obj[param_key].hasOwnProperty("out_params")&&in_obj[param_key]['out_params'].hasOwnProperty(out_id)){
            delete1.lst.push(
             `${iiin_id}.out_kwargs.${param_key}.out_params.${out_id}`
            )
          }
        }
      }  
      let update_val={
        "type":"change_data",
        "data_type":"set_list",//类型 修改数据
        "delete2":delete_lst
      }
      //删除组件
      delete1.lst.push(`${this.now_select_temp}`)
      //删除进程id
      let process_dct=this.del_process_from(out_id)
      if (process_dct){
        for (let iii=0;iii<process_dct.delete_lst.length;iii++){
          delete1.lst.unshift(process_dct.delete_lst[iii])
        }
        if (process_dct.postput){
lhp_deepcopy1(postput,process_dct.postput)
        }
      }
    //解除tree_type绑定
    let treepostput=null
      //绑定tree_type
      let tree_type_res=this.del_tree_types(out_id)
      if(tree_type_res!=null ){
        if ( Object.keys(tree_type_res.del_lst).length>0){
          
          for (let i=0;i< tree_type_res.del_lst.length;i++){
            delete1.lst.push(tree_type_res.del_lst[i].path)
        }
        }
        
        if (tree_type_res.postput){
          treepostput=tree_type_res.postput
        }
      }
      if(Object.keys(postput).length){
        update_val.postput=[{path:`flow_chat_config.dict.1.dict.${this.now_select}.flow_dict`,data:{}}]
        lhp_deepcopy1(update_val.postput[0].data,postput)
      }
      if(treepostput){
        if(!update_val.postput){update_val.postput=[{path:`flow_chat_config.dict.1.dict.${this.now_select}.flow_dict`,data:{}}]}
        lhp_deepcopy1(update_val.postput[0].data,treepostput)
      }
      console.log("update",update_val)
_this.data.全局配置对象.更新(update_val);
    },
    del_line:function(event){
      let out_id=this.now_select_line.out_id
      let out_key=this.now_select_line.out_key
      let in_id=this.flow_dict[out_id].out[out_key].out_id
      let in_key=this.flow_dict[out_id].out[out_key].out_key
      let delete1={
        'delete_before':`flow_chat_config.dict.1.dict.${this.now_select}.flow_dict`,
        'lst':[`${out_id}.out.${out_key}`,
          `${in_id}.in.${in_key}`

        ]
      }
      let delete_lst=[delete1]
      let postput={}
      let in_kwargs=this.flow_dict[in_id].in_kwargs
      let out_kwargs=this.flow_dict[out_id].out_kwargs
      //遍历in_id的key
      console.log("in_id的key",in_kwargs)
      for(let kk in in_kwargs){
        if (in_kwargs[kk].in_params&& in_kwargs[kk].in_params[0]==out_id){
          delete1.lst.push(
            `${in_id}.in_kwargs.${kk}.in_params`
          )
        }
      }
      //遍历out_id的key
      for(let kk in out_kwargs){
        if (out_kwargs[kk].out_params && out_kwargs[kk].out_params.hasOwnProperty(in_id)){
          delete1.lst.push(`${out_id}.out_kwargs.${kk}.out_params.${in_id}`
          )
        }
      }
      //更新数据
  let update_val={
  "type":"change_data",
  "data_type":"set_list",//类型 修改数据
  "delete2":delete_lst
  }
      let process_dct=this.del_process_from(out_id,in_id)
      console.log("process_dct",process_dct)
      console.log("del_line1",process_dct,delete1.lst)
      if (process_dct){
        for (let iii=0;iii<process_dct.delete_lst.length;iii++){
          delete1.lst.unshift(process_dct.delete_lst[iii])
        }
        console.log("del_line2",delete1.lst)
        if (process_dct.postput){
lhp_deepcopy1(postput,process_dct.postput)
        }
      }
    //解除tree_type绑定
    let treepostput=null
      //绑定tree_type
      let tree_type_res=this.del_tree_types(out_id,in_id)
      if(tree_type_res!=null ){
        if ( Object.keys(tree_type_res.del_lst).length>0){
          
          for (let i=0;i< tree_type_res.del_lst.length;i++){
            delete1.lst.unshift(tree_type_res.del_lst[i].path)
        }
        }
        if (tree_type_res.postput){
          lhp_deepcopy1(postput,tree_type_res.pustput)
        }
      }
if (Object.keys(postput).length){
  update_val.postput=[{path:`flow_chat_config.dict.1.dict.${this.now_select}.flow_dict`,data:postput}]
}
console.log("del line postput",update_val.postput,postput)
_this.data.全局配置对象.更新(update_val);
      
      
    },
    handleGlobalClick(event){
      if (this.now_select_line_menu_flag==true){
        this.now_select_line_menu_flag=false
      }
      if (this.now_select_temp_menu_flag==true){
        this.now_select_temp_menu_flag=false
      }
    },
    show_temp_menu:function(event,info){
      this.now_select_temp=info.key
      let rect = this.$refs.scroll.getBoundingClientRect();
      this.now_temp_menu_x=event.clientX-rect.left;
      this.now_temp_menu_y=event.clientY-rect.top;
      this.now_select_temp_menu_flag=true;

    },
    show_line_menu:function(event,info){
      this.now_select_line=info
      let rect = this.$refs.scroll.getBoundingClientRect();
      this.now_line_menu_x=event.clientX-rect.left;
      this.now_line_menu_y=event.clientY-rect.top;
      this.now_select_line_menu_flag=true;
      
    },
    check_select:function(){
       
      if (this.now_select==null)
      {return "position: relative;"}
      else if(!this.data.flow_chat_config.dict.hasOwnProperty(this.now_select)){
        return "display:none;position: relative;"
      }
      return "position: relative;"
    }, 
    check_select2:function(){
      if (this.now_select==null)
      {return "display:none;position: relative;"}
      else if(!this.data.flow_chat_config.dict.hasOwnProperty(this.now_select)){
        return "position: relative;"
      }
      return "display:none;position: relative;"
    },
    get_x1y1x2y2(info1,info2){
      return {x1:info1.x+this.get_w(info1.name)/2-6,y1:info1.y+this.get_h(info1.name)-6,x2:info2.x+this.get_w(info2.name)/2-6,y2:info2.y-6}
    },
    get_w(text){
      let _this=this;
      if (this.get_wh_init==false){
        this.get_wh_init=true;
    // 创建一个临时的span元素  
    _this.span = document.createElement("div");  
    // 设置span的样式，包括字体样式  
    _this.span.className = "set_server_show_b1";  
  
    _this.span.style.font = "0.9em helvetica";  
    _this.span.style.position = 'absolute'; // 避免影响页面布局  
    _this.span.style.visibility = 'hidden'; // 隐藏元素  
    // 将span添加到body中（或任何已存在的元素中）  
    document.body.appendChild(_this.span);  
    // 获取宽度  
      }
      // 将文本添加到span中  
      _this.span.textContent = text;  
      return _this.span.offsetWidth;  
      },
    get_h(text){
        let _this=this;
        if (this.get_wh_init==false){
          this.get_wh_init=true;
      // 创建一个临时的span元素  
      _this.span = document.createElement("div");  
      // 设置span的样式，包括字体样式  
      _this.span.className = "set_server_show_b1";  
    
      _this.span.style.font = "0.9em helvetica";  
      _this.span.style.position = 'absolute'; // 避免影响页面布局  
      _this.span.style.visibility = 'hidden'; // 隐藏元素  
      // 将span添加到body中（或任何已存在的元素中）  
      document.body.appendChild(_this.span);  
      // 获取宽度  
        }
        // 将文本添加到span中  
        _this.span.textContent = text;  
        return _this.span.offsetHeight;  
        },
    set_line_ltwh(dct){//设置线的left和top和宽高
      //获取开始位置
      let start=dct.start;
      let end=dct.end;
      let x_offset=Math.abs(dct.x1-dct.x2);
      let y_offset=Math.abs(dct.y1-dct.y2)
      //如果end在start正下方
      if (x_offset<5 && dct.y2>dct.x1){
        return "left:"+dct.x1+'px;top:'+dct.y1+"px;width:"+x_offset+10+"px;height:"+(dct.y2-dct.y1+20)+"px;"
      }
      //如果end在start左下方
      else if(dct.x1>dct.x2 && dct.y2>dct.x1){

        return "left:"+(dct.x1-dct.x2)+'px;top:'+dct.y1+"px;width:"+(x_offset+10)+"px;height:"+(dct.y2-dct.y1+20)+"px;"
      
      }
    },
    set_line(dct){
      let x_offset=Math.abs(dct.x1-dct.x2);
      // console.log("set_line:",x_offset<5,dct.y2>dct.x1,dct)
      //如果end在start正下方
      if (x_offset<5 && dct.y2>dct.y1){return 0}
      //如果end在start左下方
      else if(dct.x1>dct.x2 && dct.y2>dct.y1){return 1}
      //如果end在start右下方
      else if(dct.x1<dct.x2 && dct.y2>dct.y1){return 2}
      //如果end在start上方
      else if(x_offset<5 && dct.y2<dct.y1){return 3}
      //如果end在start左上方
      else if(dct.x1>dct.x2 && dct.y2<dct.y1){return 4}
      //如果end在start右上方
      else if(dct.x1<dct.x2&& dct.y2<dct.y1){return 5}
    },
    set_line_d_1(dct){//设置线的路径
      //获取开始位置
      let val={
        0:"M 0 0 L 0 "+(dct.y2-dct.y1)+" ",//如果end在start正下方
        1:"M 0 0 L 0 "+((dct.y2-dct.y1)/2+2)+" ",//如果end在start左下方
        2:"M 0 0 L 0 "+((dct.y2-dct.y1)/2+2)+" ",//如果end在start右下方
        3:`M 0 0 L 0 ${dct.y1-dct.y2+70}`,//如果end在start上方
        4:"M 0 0 L 0 32",//如果end在start左上方
        5:"M 0 0 L 0 32",//如果end在start右上方
      }
      return val[this.set_line(dct)]
    },
    set_line_d_2(dct){//设置线的路径
      //获取开始位置
      let val={
        0:"",//如果end在start正下方
        1:`M 0 0 L ${dct.x1-dct.x2+3} 0`,//如果end在start左下方
        2:`M 0 0 L ${dct.x2-dct.x1+3} 0`,//如果end在start右下方
        3:"",//如果end在start上方
        4:`M 0 0 L ${(dct.x1-dct.x2)/2+3} 0`,//如果end在start左上方
        5:`M 0 0 L ${(dct.x2-dct.x1)/2+3} 0`,//如果end在start右上方
      }
      return val[this.set_line(dct)]
    },
    set_line_d_3(dct){//设置线的路径
      //获取开始位置
      let val={
        0:"",//如果end在start正下方
        1:"M 0 0 L 0 "+((dct.y2-dct.y1)/2+7)+" ",//如果end在start左下方
        2:"M 0 0 L 0 "+((dct.y2-dct.y1)/2+7)+" ",//如果end在start右下方
        3:"",//如果end在start上方
        4:`M 0 0 L 0 ${dct.y1-dct.y2+77}`,//如果end在start左上方
        5:`M 0 0 L 0 ${dct.y1-dct.y2+77}`,//如果end在start右上方
      }
      return val[this.set_line(dct)]
    },
    set_line_d_4(dct){//设置线的路径
      //获取开始位置
      let val={
        0:"",//如果end在start正下方
        1:``,//如果end在start左下方
        2:``,//如果end在start右下方
        3:"",//如果end在start上方
        4:`M 0 0 L ${(dct.x1-dct.x2)/2+3} 0`,//如果end在start左上方
        5:`M 0 0 L ${(dct.x2-dct.x1)/2+3} 0`,//如果end在start右上方
      }
      return val[this.set_line(dct)]
    },
    set_line_d_5(dct){//设置线的路径
      //获取开始位置
      let val={
        0:"",//如果end在start正下方
        1:``,//如果end在start左下方
        2:``,//如果end在start右下方
        3:"",//如果end在start上方
        4:"M 0 0 L 0 44",//如果end在start左上方
        5:"M 0 0 L 0 44",//如果end在start右上方
      }
      return val[this.set_line(dct)]
    },
    set_line_d_ltwh1(dct){
      let x1=dct.x1,y1=dct.y1,x2=dct.x2,y2=dct.y2;
      let val={
        0:`left: ${x1+4.5}px;top:${y1+1+4}px;height: ${y2-y1+5}px;width:${3}px;`,//如果end在start正下方
        1:`left: ${x1+4.5}px;top:${y1+1+4}px;height: ${(y2-y1)/2+5}px;width:${3}px;`,//如果end在start左下方
        2:`left: ${x1+4.5}px;top:${y1+1+4}px;height: ${(y2-y1)/2+5}px;width:${3}px;`,//如果end在start右下方
        3:`left: ${x1+4.5}px;top:${y2-35}px;height: ${(y1-y2)+10+70}px;width:${3}px;`,//如果end在start上方
        4:`left: ${x1+4.5}px;top:${y1+1+4}px;height: ${37}px;width:${3}px;`,//如果end在start左上方
        5:`left: ${x1+4.5}px;top:${y1+1+4}px;height: ${37}px;width:${3}px;`,//如果end在start右上方
      }
      // console.log("ltwh1:",val[this.set_line(dct)])
      return val[this.set_line(dct)]
    },
    
    set_line_d_ltwh2(dct){
      let x1=dct.x1,y1=dct.y1,x2=dct.x2,y2=dct.y2;
      let val={
        0:``,//如果end在start正下方
        1:`left: ${x2+4.5}px;top:${y1+(y2-y1)/2+5}px;height: ${3}px;width:${x1-x2+33}px;`,//如果end在start左下方
        2:`left: ${x1+4.5}px;top:${y1+(y2-y1)/2+5}px;height: ${3}px;width:${x2-x1+5}px;`,//如果end在start右下方
        3:``,//如果end在start上方
        4:`left: ${x1-(x1-x2)/2+4.5}px;top:${y1+35}px;height: ${3}px;width:${(x1-x2)/2+7}px;`,//如果end在start左上方
        5:`left: ${x1+4.5}px;top:${y1+35}px;height: ${3}px;width:${(x2-x1)/2+7}px;`,//如果end在start右上方
      }
      return val[this.set_line(dct)]
    },
    
    set_line_d_ltwh3(dct){
      let x1=dct.x1,y1=dct.y1,x2=dct.x2,y2=dct.y2;
      let val={
        0:``,//如果end在start正下方
        1:`left: ${x2+4.5}px;top:${y1+(y2-y1)/2+5}px;height: ${(y2-y1)/2+5}px;width:${3}px;`,//如果end在start左下方
        2:`left: ${x2+4.5}px;top:${y1+(y2-y1)/2+5}px;height: ${(y2-y1)/2+5}px;width:${3}px;`,//如果end在start右下方
        3:``,//如果end在start上方
        4:`left: ${x1-(x1-x2)/2+4.5}px;top:${y2-35}px;height: ${70+y1-y2}px;width:${10}px;`,//如果end在start左上方
        5:`left: ${x1+(x2-x1)/2+4.5}px;top:${y2-35}px;height: ${70+y1-y2}px;width:${10}px;`,//如果end在start右上方
      }
      return val[this.set_line(dct)]
    },
    
    set_line_d_ltwh4(dct){
      let x1=dct.x1,y1=dct.y1,x2=dct.x2,y2=dct.y2;
      let val={
        0:``,//如果end在start正下方
        1:``,//如果end在start左下方
        2:``,//如果end在start右下方
        3:``,//如果end在start上方
        4:`left: ${x2+4.5}px;top:${y2-35}px;height: ${3}px;width:${(x1-x2)/2+7}px;`,//如果end在start左上方
        5:`left: ${x1+(x2-x1)/2+4.5}px;top:${y2-35}px;height: ${3}px;width:${(x2-x1)/2+7}px;`,//如果end在start右上方
      }
      return val[this.set_line(dct)]
    },
    
    set_line_d_ltwh5(dct){
      let x1=dct.x1,y1=dct.y1,x2=dct.x2,y2=dct.y2;
      let val={
        0:``,//如果end在start正下方
        1:``,//如果end在start左下方
        2:``,//如果end在start右下方
        3:``,//如果end在start上方
        4:`left: ${x2+4.5}px;top:${y2-35}px;height: ${55}px;width:${3}px;`,//如果end在start左上方
        5:`left: ${x2+4.5}px;top:${y2-35}px;height: ${55}px;width:${3}px;`,//如果end在start右上方
      }
      return val[this.set_line(dct)]
    },
    set_line_d3(dct){//设置箭头的反转
      //获取开始位置
      let start=dct.start;
      let end=dct.end;
      let x_offset=Math.abs(dct.x1-dct.x2);
      let y_offset=Math.abs(dct.y1-dct.y2);
      //如果end在start正下方
      if (x_offset<5 && dct.y2>dct.x1){
        return ""
      }

    },
    svg_down(event,params={}){
      let rect = this.$refs.scroll.getBoundingClientRect();
      this.write_line_now_obj={
        x:event.clientX-rect.left-25,
        y:event.clientY-rect.top,
        name:''
      }
      this.连线_clientX=event.clientX;
      this.连线_clientY=event.clientY;
      this.连线_startx=this.write_line_now_obj.x;
      this.连线_starty=this.write_line_now_obj.y;
      this.write_line_start_key=params.key;
      this.write_line_flag=true;
    },
    //检测输出组件与输入组件是否存在连线
    check_line(out_id,in_id){
      
      let start_obj=this.flow_dict[in_id]
      let start_obj_in_kwargs=start_obj.in_kwargs;
      for (let kk in start_obj_in_kwargs){
        if (start_obj_in_kwargs[kk].in_params && start_obj_in_kwargs[kk].in_params[0]==out_id){
          return {"type":true,'data':start_obj_in_kwargs[kk].in_params[2]}
        }
      }
      return {"type":false}
    },
    //在已有连线的组件上进行连线
    add_line_params(out_id,in_id,check_line_res,out_params_info){
let _this=this;
      let key1=out_params_info.key1//出参组件的 出参 id
      let key2=out_params_info.key2//入参组件的 入参 id
      //1.更新 入参组件的 入参连线index计数
      //2.更新 入参组件的 入参连线 的数据
      let in_kwargs_data={}
      in_kwargs_data[key2]={"in_params":{},"in_type1":"1",'v1_':[out_id,key1]}
                      //--------输出的key和value
      in_kwargs_data[key2]['in_params']=[out_id,key1,check_line_res.data]
      //4.更新 出参组件的 出参连线index计数
      //5.更新 出参组件的 出参连线 的数据
      let out_kwargs_data={}
      out_kwargs_data[key1]={"out_params":{}}
                      //--------输出的key和value
      out_kwargs_data[key1]['out_params'][in_id]={}
      out_kwargs_data[key1]['out_params'][in_id][key2]={"key":check_line_res.data}
//更新数据 
let update_val={
  "type":"change_data",
  "data_type":"set_list",//类型 修改数据
  update_params:[
    {
      name:"检查目标元素是否存在 存在则不执行该操作",
      path:`flow_chat_config.dict.1.dict.${this.now_select}.flow_dict.${in_id}.in_kwargs.${key2}.in_params`,
      message:"已经拥有此传参了",
      use:"check_true"
    }
  ],
  "postput":[
    {
      'path':`flow_chat_config.dict.1.dict.${this.now_select}.flow_dict.${out_id}.out_kwargs`,
      'data':out_kwargs_data
    },
    //更新
    {
      'path':`flow_chat_config.dict.1.dict.${this.now_select}.flow_dict.${in_id}.in_kwargs`,
      'data':in_kwargs_data
    },
  ],
}
_this.data.全局配置对象.更新(update_val);
    },
    svg_up_x(params,out_params_info){//创建连线
      let out_id=this.write_line_start_key
      let in_id=params.key;
      
      let key1=out_params_info.key1//出参组件的 出参 id
      let key2=out_params_info.key2//入参组件的 入参 id
      let start_obj=this.flow_dict[out_id]
      let end_obj=this.flow_dict[in_id]
      //判断输出组件和输入组件是否已经拥有连线 
      let has_line=this.check_line(out_id,in_id);
      if (has_line.type==true){
        this.add_line_params(out_id,in_id,has_line,out_params_info)
        return
      }
      // console.log(start_obj,end_obj)
      //1.更新 入参组件的 入参连线index计数
      //2.更新 入参组件的 入参连线 的数据
      let in_kwargs_data={}
      in_kwargs_data[key2]={"in_params":{}}
      in_kwargs_data[key2].in_type1='1'//0表示固定传参 1表示组件传参 2表示配置设参
      in_kwargs_data[key2].v1_=[out_id,key1]
                      //--------输出的key和value
      in_kwargs_data[key2]['in_params']=[out_id,key1,["@out_idx","@in_idx"]]
      //4.更新 出参组件的 出参连线index计数
      //5.更新 出参组件的 出参连线 的数据
      let out_kwargs_data={}
      out_kwargs_data[key1]={"out_params":{}}
                      //--------输出的key和value
      out_kwargs_data[key1]['out_params'][in_id]={}
      out_kwargs_data[key1]['out_params'][in_id][key2]={"key":["@out_idx","@in_idx"]}
      let postput={
        'path':`flow_chat_config.dict.1.dict.${this.now_select}.flow_dict`,
        'data':{}
      }
      
      postput.data[this.write_line_start_key]={}
      lhp_deepcopy1(postput.data[this.write_line_start_key],{"out":{"@out_idx":{
                                                        "out_id":params.key,
                                                        "out_key":"@in_idx",}}})
      lhp_deepcopy1(postput.data[this.write_line_start_key],{"out_kwargs":out_kwargs_data})
      lhp_deepcopy1(postput.data[this.write_line_start_key],{"out_idx":"@out_idx"})
      postput.data[params.key]={}
      lhp_deepcopy1(postput.data[params.key],{"in":{
                                                                  "@in_idx":{
                                                                    "in_id":this.write_line_start_key,
                                                                    "in_key":"@out_idx",
                                                                  }
                                                              }})
      lhp_deepcopy1(postput.data[params.key],{"in_kwargs":in_kwargs_data})
      lhp_deepcopy1(postput.data[params.key],{"in_idx":"@in_idx"})
      //给进程上下绑定进程id
      let process_data=this.set_process_from(out_id,in_id);
      if (process_data!=null){
        lhp_deepcopy1(postput.data,process_data.postput)
      }
      //绑定tree_type
      let tree_type_res=this.set_tree_types(out_id,in_id)
      if(tree_type_res!=null && Object.keys(tree_type_res.postput.data).length>0){
        lhp_deepcopy1(postput.data,tree_type_res.postput.data)
      }
//更新数据 
let update_val={
  "type":"change_data",
  "data_type":"set_list",//类型 修改数据
  update_params:[
    {//将路径为path的数据 进行 +1操作 并且存入属性add中 提供给data里面携带@add的属性调用
      name:'@out_idx',
      path:`flow_chat_config.dict.1.dict.${this.now_select}.flow_dict.${this.write_line_start_key}.out_idx`,//数据路径
      use:'++s'
    },
    {//将路径为path的数据 进行 +1操作 并且存入属性add中 提供给data里面携带@add的属性调用
      name:'@in_idx',
      path:`flow_chat_config.dict.1.dict.${this.now_select}.flow_dict.${params.key}.in_idx`,//数据路径
      use:'++s'
    }, 
    {
      name:"检查目标元素是否存在 存在则不执行该操作",
      path:`flow_chat_config.dict.1.dict.${this.now_select}.flow_dict.${params.key}.in_kwargs.${key2}.in_params`,
      message:"已经拥有此传参了",
      use:"check_true"
    }
  ],
  "postput":[postput],
}
_this.data.全局配置对象.更新(update_val);

this.write_line_flag=false;
    },
    //连线点击
    svg_up(event,params={}){
      let __this=this;
      let start_obj=this.flow_dict[this.write_line_start_key]
      let end_obj=this.flow_dict[params.key]
      if(this.write_line_flag==true){
        if(params.key!=this.write_line_start_key){
          let start_out_kwargs={};
          let end_in_kwargs={};
          let in_kwargs=this.flow_dict[params.key].in_kwargs;
          let out_kwargs=this.flow_dict[this.write_line_start_key].out_kwargs;
          if(!out_kwargs){Vue.prototype.$notify({type: 'error',message: '输出组件没有出参'});return}
          if(!in_kwargs){Vue.prototype.$notify({type: 'error',message: '输入组件没有入参'});return}
          
          for (let key in in_kwargs){
            if (!in_kwargs[key].in_params){end_in_kwargs[key]=in_kwargs[key].name;}
          }

          if(!(Object.keys(end_in_kwargs)).length){Vue.prototype.$notify({type: 'error',message: '输入组件入参不需要传递了'});return}
          for (let key in out_kwargs){
            start_out_kwargs[key]=out_kwargs[key].name;
          }
          select2__({
            "title":`${start_obj.name}->${end_obj.name}`,
          "select1":start_out_kwargs,"select2":end_in_kwargs,
            callback:function(out_params_info){__this.svg_up_x(params,out_params_info)}
          })
          
        }
      }
    },
    svg_up2(event){
      if(this.write_line_flag==true){

        this.write_line_flag=false;
      }
    },
    handleMouseDown(event, params = {}) {  
      if (event.button === 2) {
        // 如果是右键，阻止进一步处理
        return;
    }
      console.log('Mouse down, but ignoring params:', event);  
      this.拖动_clientX=event.clientX;
      this.拖动_clientY=event.clientY;
      let oojb=this.flow_dict[params.key];
      this.拖动_startx=oojb.x;
      this.拖动_starty=oojb.y;
      this.拖动_key=params.key;
      this.拖动_flag=true;
      console.log('旧坐标:',this.拖动_startx,this.拖动_starty)
      // 这里默认不处理传入的params，因为它不是从事件直接传入的  
      // 你可以在其他地方调用这个函数时传入params  
      // 你可能想在这里做一些初始化工作，比如设置一个标志位  
    },  

handleMouseLeave(event){
  // this.movein_flag=false;
},
    handleMouseMove(event) {  
      // this.movein_flag=true
      // if (this.拖动_flag == true){
      //   let oojb=this.flow_dict[this.拖动_key];
      //   oojb.x=this.拖动_startx+event.clientX-this.拖动_clientX;
      //   oojb.y=this.拖动_starty+event.clientY-this.拖动_clientY;
      // }else if(this.write_line_flag==true){

      //   this.write_line_now_obj.x=this.连线_startx+event.clientX-this.连线_clientX;
      //   this.write_line_now_obj.y=this.连线_starty+event.clientY-this.连线_clientY;
      // }
    },  
  
    handleMouseUp(event) {  
      // if(this.拖动_flag==true){
      //   this.拖动_flag=false;
        
      //   let new_x=this.拖动_startx+event.clientX-this.拖动_clientX;
      //   let new_y=this.拖动_starty+event.clientY-this.拖动_clientY;
      //   //如果没有拖动产生距离 那么触发click
      //   if ((this.拖动_startx==new_x) && (this.拖动_starty==new_y)){
      //     console.log("this.拖动_startx,new_x,this.拖动_starty,new_y",this.拖动_startx,new_x,this.拖动_starty,new_y)
      //     this.temp_click(event,{key:this.拖动_key})
      //   }else{

      //     let path=`flow_chat_config.dict.1.dict.${this.now_select}.flow_dict.${this.拖动_key}`
      //     lhp_run_func(this.data.___update,{"type":"change_data","data_type":"postput","path":path,"data":{"x":new_x,"y":new_y}});
    
      //   }
      //   // let temp_v= this.info_dct[this.拖动_key];
        
      //   // console.log('新坐标:',temp_v.x,temp_v.y);
      // }else if(lhp_run_func(this.data.___get_now_type)&&this.movein_flag){//如果处于组件拖拽进来的状态
      //   // console.log("mouseup2")
      //   // let new_key=Object.keys(this.info_dct).reduce((max, current) => Math.max(max, current), -Infinity)+1;
      //   // console.log("mouseup3",new_key)
      //   let rect = this.$refs.scroll.getBoundingClientRect();  
      //   let temp_info=JSON.parse(JSON.stringify(lhp_run_func(this.data.___get_now_info)))
      //   if (!(temp_info.in_kwargs)){temp_info.in_kwargs={}}
      //   if (!(temp_info.tree_type)){temp_info.tree_type=0}
      //   temp_info.tree_type_from={}//当前组件的tree_type由哪些决定
      //   if (!(temp_info.tree_type_from)){temp_info.tree_type_from=0}

      //   try{
      //     for(let kk in temp_info.in_kwargs){
      //       temp_info.in_kwargs[kk].in_type1="0"//0表示固定传参 1表示组件传参 2表示配置设参
      //       temp_info.in_kwargs[kk].v0=temp_info.in_kwargs[kk].default//0表示固定传参 1表示组件传参 2表示配置设参
      //       temp_info.in_kwargs[kk].v1_=[null,null]//0表示固定传参 1表示组件传参 2表示配置设参
      //       temp_info.in_kwargs[kk].v2=""
      //       temp_info.in_kwargs[kk].in_type3='0'//0表示不强行转换类型
      //     }
      //   }
      //   catch{}
      //   temp_info.in_kwargs['-1']={
      //     "name": "flag",
      //     "note": "通过传入值来控制组件的运行顺序 不传值时表示按照默认方式运行",
      //     "default": "0",
      //     "type": "str",
      //     "in_type1": "0",
      //     "v0": "0",
      //     "v1_": [
      //         null,
      //         null
      //     ],
      //     "v2": "",
      //     "in_type3": "0"
      // }
      //   let update_params=[
      //     {//将路径为path的数据 进行 +1操作 并且存入属性add中 提供给data里面携带@add的属性调用
      //       name:'@add_index',
      //       path:`flow_chat_config.dict.${this.now_select}.flow_chat_base_info.idx`,//数据路径
      //       use:'++s'
      //     },
          
      //   ] 
      //   let postput=[
      //     {
      //       'path':`flow_chat_config.dict.1.dict.${this.now_select}.flow_dict.@add_index`,
      //       'data':temp_info
      //     },
          
      //     {
      //       'path':`flow_chat_config.dict.${this.now_select}.flow_chat_base_info`,
      //       'data':{"idx":"@add_index"}
      //     },
      //   ]
        
      //   temp_info['process_id']=null
      //   temp_info['process_from']={}
      //   //如果目标是进程创建类的组件  那么会新建新的进程id 以及进程名称 和可更改进程名的标志
      //   if (temp_info.temp_type=='process'){
      //     update_params.push(
      //       {
      //         name:'@add_process_id',
      //         path:`flow_chat_config.dict.${this.now_select}.flow_chat_base_info.process_idx`,
      //         use:"++s"
      //       }
      //     )
      //     postput.push({
      //       'path':`flow_chat_config.dict.${this.now_select}.flow_chat_base_info`,
      //       'data':{'process_idx':'@add_process_id',"process_dct":{"@add_process_id":temp_info.process_name||'未命名的进程名称'}}
      //     })
          
      //   temp_info['process_id']='@add_process_id'
      //   temp_info['process_change']=true
      //   temp_info['process_from']['@add_process_id']={'@add_index':["@add_index"]}//创建进程的组件的 进程id来源于自身


      //   }
      //   lhp_deepcopy1(temp_info,{
      //     temp_name:temp_info.name,
      //     x:event.clientX-rect.left-60,
      //     y:event.clientY-rect.top-60,
      //     out_idx:0,
      //     in_idx:0,
      //     out:{},
      //     in:{}
      // })
      //   //更新数据
      //   let update_val={
      //     "type":"change_data",
      //     "data_type":"set_list",//类型 修改数据
      //     update_params:update_params,
      //     "postput":postput,
      //   }
      // _this.data.全局配置对象.更新(update_val);

      // }else if(this.write_line_flag==true){
      //   this.write_line_flag=false;
      // }
      
       
    }  ,
    check_type:function(){
      if (typeof this.$el.querySelector === 'function') {  
        return true
    } else { return false }
    },
    //id不存在则返回true
    check_p:function(process_id){return process_id==null ||(!(this.process_dct[process_id]))},

    //当组件间进行参数传递时  建立相应的进程关系
    process_add_lst:function(use_compontent,lst,temp_id,put_process_id,put_lst){
      //process_from={1:{'1':{}}}
      //process_from_fast={1:{'from_key':1,fast:{1:true,2:true,3:true}}}
      let now_info=use_compontent[temp_id]
      put_lst=JSON.parse(JSON.stringify({"a":put_lst}))['a']
      let put_dct={};
      // console.log(put_lst)
      for (let k=0;k<put_lst.length;k++){
        put_dct[put_lst[k]]=true
      }
    // console.log('put_lst,put_dct',put_lst,put_dct)
      // let process_id=now_info.process_id
      let check_id=null
    // console.log("add_lst_flag",this.check_p(process_id)==check_p_flag)
      // if (this.check_p(put_process_id)==check_p_flag){
        let in_ids=null;
        let in_kwargs=now_info.in_kwargs,out_kwargs=now_info.out_kwargs;
        for(let i in in_kwargs){
          try{
          check_id=in_kwargs[i].in_params[0];
          //如果目标id不在目标字典中  那么将process_id传入
          if (!(check_id in put_dct)){
              lst.push([put_process_id,temp_id,check_id,put_lst])
          }
        }catch{}
        }
        for(let i in out_kwargs){
          try{
          in_ids=Object.keys(out_kwargs[i].out_params)
          for (let j in in_ids){
            
            check_id=in_ids[j];
            //如果目标id不在目标字典中  那么将process_id传入
            if (!(check_id in put_dct)){
                lst.push([put_process_id,temp_id,check_id,put_lst])
            }

            }}catch{}
        }
      // }
    },
    set_process_from:function(输出组件_id,输入组件_id){
       let use_compontent=JSON.parse(JSON.stringify(this.flow_dict));
       let 输出组件_进程id=use_compontent[输出组件_id].process_id;
       let 输入组件_进程id=use_compontent[输入组件_id].process_id;
       console.log("输出组件_进程id",输出组件_进程id)
       let lst=[];//待处理队列
       let post_dct={};//要进行post的对象
       if (!this.check_p(输出组件_进程id)){
        console.log("输出拥有进程id:",!this.check_p(输出组件_进程id))
        lst.push(
          {
            输出组件_进程id:输出组件_进程id,
            输出组件_id:输出组件_id,
            输入组件_id:输入组件_id,
            进程路径:this.get_process_lst_by_process_id(输出组件_id,输出组件_进程id)
          }
        )
       }
       if (!this.check_p(输入组件_进程id)){
        // console.log("inininini",in_id,输入组件_进程id)
       console.log("输入拥有进程id:",this.check_p(输出组件_进程id))
        lst.push(
          {
            输出组件_进程id:输入组件_进程id,
            输出组件_id:输入组件_id,
            输入组件_id:输出组件_id,
            进程路径:this.get_process_lst_by_process_id(输入组件_id,输入组件_进程id)
          })
       }
       let 临时记录组件当前进程id={};
       let 当前处理项=null,新路径=null,当前处理项数据=null;
       while (lst.length){
        当前处理项=lst.pop();//取出当前处理项
        //如果输入组件已拥有进程id 则跳过
        当前处理项数据=this.flow_dict[当前处理项.输入组件_id];
        if(!this.check_p(当前处理项数据.process_id) || (临时记录组件当前进程id[当前处理项.输入组件_id])){continue}
        //存入临时记录表 避免重复添加
        临时记录组件当前进程id[当前处理项.输入组件_id]=true;
        //更新路径
        新路径=JSON.parse(JSON.stringify({'a':当前处理项.进程路径}))['a'];
        新路径.push(当前处理项.输入组件_id);
        //写入数据
        post_dct[当前处理项.输入组件_id]={
          process_id:当前处理项.输出组件_进程id,
          process_from:{}
        }
        post_dct[当前处理项.输入组件_id].process_from[当前处理项.输出组件_进程id]=新路径;
        //遍历出参和入参 将组件加入待处理列表
        let in_kwargs=当前处理项数据.in_kwargs,out_kwargs=当前处理项数据.out_kwargs;
        for(let i in in_kwargs){
          try{
          check_id=in_kwargs[i].in_params[0];
          //如果目标id不在目标字典中  那么将process_id传入
          lst.push(
            {
              输出组件_进程id:当前处理项.输出组件_进程id,
              输出组件_id:当前处理项.输入组件_id,
              输入组件_id:check_id,
              进程路径:新路径
            })
        }catch{}
        }
        for(let i in out_kwargs){
          try{
          in_ids=Object.keys(out_kwargs[i].out_params)
          for (let j in in_ids){
            
            check_id=in_ids[j];
            //如果目标id不在目标字典中  那么将process_id传入
            lst.push(
              {
                输出组件_进程id:当前处理项.输出组件_进程id,
                输出组件_id:当前处理项.输入组件_id,
                输入组件_id:check_id,
                进程路径:新路径
              })

            }}catch{}
        }}

       return post_dct
      },
    //当删除组件 或者删除连线时 删除相应的进程关系
    process_add_lst2:function(lst,temp_id,put_process_id,put_lst=null,check_id=null){
      // console.log("lst:",lst)
      // console.log("temp_id:",temp_id)
      // console.log("put_process_id:",put_process_id)
      // console.log("put_lst:",put_lst)
      // console.log("check_id:",check_id)
        //process_from={1:{'1':{}}}
        //process_from_fast={1:{'from_key':1,fast:{1:true,2:true,3:true}}}
        let now_info=this.flow_dict[temp_id]
        // let process_id=now_info.process_id
      // console.log("add_lst_flag",this.check_p(process_id)==check_p_flag)
        // if (this.check_p(put_process_id)==check_p_flag){
          let in_ids=null,del_lst=null,new_lst=null;
          let in_kwargs=now_info.in_kwargs,out_kwargs=now_info.out_kwargs,add_llst=[];
          if (check_id!=null){
        // console.log("temp->check_id",temp_id,check_id,this.flow_dict[check_id].process_from[put_process_id])
            try{
              del_lst=this.flow_dict[check_id].process_from[put_process_id][temp_id];
              // console.log("del_lst",del_lst)
              if (!del_lst){return}
              // console.log(`del_lst ${check_id}(check_id) ${put_process_id}(process_id)`,this.flow_dict[check_id],put_process_id,del_lst)
              lst.push([put_process_id,temp_id,check_id,del_lst])
            }catch{}
            return
          }
      ///////////////////////
          for(let i in in_kwargs){
            try{
  add_llst.push(in_kwargs[i].in_params[0])}catch{}}
      for(let i in out_kwargs){
            try{
            in_ids=Object.keys(out_kwargs[i].out_params)
            for (let j in in_ids){
  add_llst.push(in_ids[j])
            }}catch{}}
  
  if(put_lst==null&&check_id==null){
      
  for(let ii=0;ii<add_llst.length;ii++){
      // console.log("check",add_llst[ii],this.flow_dict[add_llst[ii]].process_from[put_process_id][temp_id])
      check_id=add_llst[ii]
      del_lst=this.flow_dict[check_id].process_from[put_process_id][temp_id]
      try{del_lst=this.flow_dict[check_id].process_from[put_process_id][temp_id]}catch{continue}
      if(!del_lst){continue}
      new_lst=JSON.parse(JSON.stringify({"a":del_lst}))["a"];
      new_lst.pop();
        lst.push([put_process_id,temp_id,check_id,del_lst])
      
  }
         return 
      }
  let put_lst_str=put_lst.join("_")
  //let test_str=''
  for(let ii=0;ii<add_llst.length;ii++){
      // console.log("check",add_llst[ii],this.flow_dict[add_llst[ii]].process_from[put_process_id][temp_id])
      check_id=add_llst[ii]
      try{del_lst=this.flow_dict[check_id].process_from[put_process_id][temp_id]}catch{continue}
      if(!del_lst){continue}
      new_lst=JSON.parse(JSON.stringify({"a":del_lst}))["a"];
      new_lst.pop();
      if (new_lst.join("_")==put_lst_str){
          //test_str=test_str+check_id+' '
        lst.push([put_process_id,temp_id,check_id,del_lst])
      }
  }
      
      //if(!test_str){console.log(`${temp_id}=>${check_id}`,test_str)}
      },
    //
    del_process_from__x2:function(obj){
      if(!obj.临时_process_dct[obj.组件id]){
        let process_from=obj.process_from || this.flow_dict[obj.组件id].process_from || {};
        for(let 进程id in process_from){
          obj.临时_process_dct[进程id]=process_from[进程id].join('_')
        }
      }
      return obj.临时_process_dct[obj.组件id]
    },
    del_process_from__x:function(obj){
      let lst=[];
      if(obj.flag=='删除组件'){
        let 输出组件数据=this.flow_dict[obj.输出组件_id];
        let process_from=输出组件数据.process_from||{};
        for(let k in process_from){
          lst.push(
            {
              组件id:obj.输出组件_id,
              路径:process_from[k],
              进程id:k
            }
          )
        }
      }
      else if(obj.flag=='删除连线'){
        let 输出组件数据=this.flow_dict[obj.输出组件_id];
        let 输入组件数据=this.flow_dict[obj.输入组件_id];
        let process_dct1=输出组件数据.process_from||{};
        let process_dct2=输入组件数据.process_from||{};
        //判断输入组件 路径是否由输出组件 路径传入
        for(let k in process_dct1){
          if(process_dct2[k].join("_")==(process_dct1[k].join("_")+'_'+obj.输入组件_id)){
            lst.push({
              组件id:obj.输入组件_id,
              路径:process_dct2[k],
              进程id:k
            }
            )
          }
        }
        //判断输出组件 路径是否由输入组件 路径传入
        for(let k in process_dct2){
          if(process_dct1[k].join("_")==(process_dct2[k].join("_")+'_'+obj.输出组件_id)){
            lst.push({
              组件id:obj.输出组件_id,
              路径:process_dct1[k],
              进程id:k
            }
            )
          }
        }
      }else if(obj.flag=='删除指定路径'){
        let 路径=obj.路径;
        let 进程id=obj.进程id;
        let 组件id=obj.组件id;
        let 组件数据=this.flow_dict[组件id];
        let in_kwargs=组件数据.in_kwargs;
        let out_kwargs=组件数据.out_kwargs;
        for(let i in in_kwargs){
          try{
            check_id=in_kwargs[i].in_params[0];
            if ((this.flow_dict[check_id].process_from[进程id]||['#']).join("_")==(路径.join("_")+'_'+check_id)){
              lst.push({
                组件id:check_id,
                路径:this.flow_dict[check_id].process_from[进程id],
                进程id:进程id
              })
            }
        }catch{}
        }
        
      for(let i in out_kwargs){
        try{
        in_ids=Object.keys(out_kwargs[i].out_params)
        for (let j in in_ids){
          check_id=in_ids[j];
          if ((this.flow_dict[check_id].process_from[进程id]||['#']).join("_")==(路径.join("_")+'_'+check_id)){
            lst.push({
              组件id:check_id,
              路径:this.flow_dict[check_id].process_from[进程id],
              进程id:进程id
            })
          }
        }}catch{}}}
      return lst
    },
    del_process_from_get_process_id:function(obj){
      let add_new_prcess=obj.add_new_prcess;
      let del_路径_dct=obj.del_路径_dct;
      let del_line=obj.del_line;
      let del_id=obj.del_id;
      let 组件id=obj.组件id;
      // console.log("组件id为",组件id,'开始获取新id')
      // console.log("为删除processid的添加新的进程id",JSON.parse(JSON.stringify(obj)));
      // console.log("为删除processid的添加新的进程id #1")
      let 组件数据=this.flow_dict[组件id];
      // console.log("为删除processid的添加新的进程id #2")
      let in_kwargs=组件数据.in_kwargs;
      // console.log("为删除processid的添加新的进程id #3")
      let out_kwargs=组件数据.out_kwargs;
      // console.log("为删除processid的添加新的进程id #4")
      let check_id=null;
      // console.log("为删除processid的添加新的进程id #5",in_kwargs,out_kwargs)
      //遍历入参和出参 获取到新的process_id
      for(let i in in_kwargs){
        try{
          check_id=in_kwargs[i].in_params[0];
          if (check_id==del_id){continue}
          if(del_line && del_line[0]==check_id && del_line[1]==组件id){continue}
          let check_process_from=this.flow_dict[check_id].process_from||{};
          let del_lst=del_路径_dct[check_id];
          
      // console.log("为删除processid的添加新的进程id #6",JSON.parse(JSON.stringify(check_process_from)))
          let add_new=add_new_prcess[check_id];
          // console.log("add_new_prcess",add_new_prcess)
          //如果目标组件id拥有新的进程id 那么直接设置
          if(add_new){
            for(let check_process_id in add_new){
              let res={};
              // console.log("为删除processid的添加新的进程id #8")
              res[组件id]={process_id:check_process_id,process_from:{}};
              // console.log("为删除processid的添加新的进程id #9")
              let new_lst=JSON.parse(JSON.stringify(add_new[check_process_id]));
              // console.log("为删除processid的添加新的进程id #10")
              new_lst.push(组件id);
              // console.log("为删除processid的添加新的进程id #11")
              res[组件id].process_from[check_process_id]=new_lst;
              // console.log("为删除processid的添加新的进程id #12",new_lst)
              return res

            }
          }
          for(let check_process_id in check_process_from){
            if(del_lst){
              //来源没有被删除
              if (!del_lst.includes(check_process_id)){
                // console.log("为删除processid的添加新的进程id #7")
                let res={};
                // console.log("为删除processid的添加新的进程id #8")
                res[组件id]={process_id:check_process_id,process_from:{}};
                // console.log("为删除processid的添加新的进程id #9")
                let new_lst=JSON.parse(JSON.stringify(check_process_from[check_process_id]));
                // console.log("为删除processid的添加新的进程id #10")
                new_lst.push(组件id);
                // console.log("为删除processid的添加新的进程id #11")
                res[组件id].process_from[check_process_id]=new_lst;
                // console.log("为删除processid的添加新的进程id #12",new_lst)
                return res
              }
            }else{
              // console.log("为删除processid的添加新的进程id #7")
              let res={};
              // console.log("为删除processid的添加新的进程id #8")
              res[组件id]={process_id:check_process_id,process_from:{}};
              // console.log("为删除processid的添加新的进程id #9")
              let new_lst=JSON.parse(JSON.stringify(check_process_from[check_process_id]));
              // console.log("为删除processid的添加新的进程id #10")
              new_lst.push(组件id);
              // console.log("为删除processid的添加新的进程id #11")
              res[组件id].process_from[check_process_id]=new_lst;
              // console.log("为删除processid的添加新的进程id #12",new_lst)
              return res
            }
          }
      }catch{}
      }
      
    for(let i in out_kwargs){
      try{
      in_ids=Object.keys(out_kwargs[i].out_params)
      for (let j in in_ids){
        check_id=in_ids[j];
        
        // console.log("为删除processid的添加新的进程id #7-1 check_id",check_id)
        if (check_id==del_id){continue}
        if(del_line && del_line[0]==组件id && del_line[1]==check_id){continue}
        // console.log("为删除processid的添加新的进程id #7-2 check_id",check_id)
        let check_process_from=this.flow_dict[check_id].process_from||{};
        let del_lst=del_路径_dct[check_id];
        
        // console.log("为删除processid的添加新的进程id #7-3 check_id",check_process_from)
        let add_new=add_new_prcess[check_id];
        // console.log("add_new_prcess",add_new_prcess)
        //如果目标组件id拥有新的进程id 那么直接设置
        if(add_new){
          for(let check_process_id in add_new){
            let res={};
            // console.log("为删除processid的添加新的进程id #8")
            res[组件id]={process_id:check_process_id,process_from:{}};
            // console.log("为删除processid的添加新的进程id #9")
            let new_lst=JSON.parse(JSON.stringify(add_new[check_process_id]));
            // console.log("为删除processid的添加新的进程id #10")
            new_lst.push(组件id);
            // console.log("为删除processid的添加新的进程id #11")
            res[组件id].process_from[check_process_id]=new_lst;
            // console.log("为删除processid的添加新的进程id #12",new_lst)
            return res

          }
        }
        for(let check_process_id in check_process_from){
          if(del_lst){
            //来源没有被删除
            if (!del_lst.includes(check_process_id)){
              // console.log("为删除processid的添加新的进程id #7")
              let res={};
              // console.log("为删除processid的添加新的进程id #8")
              res[组件id]={process_id:check_process_id,process_from:{}};
              // console.log("为删除processid的添加新的进程id #9")
              let new_lst=JSON.parse(JSON.stringify(check_process_from[check_process_id]));
              // console.log("为删除processid的添加新的进程id #10")
              new_lst.push(组件id);
              // console.log("为删除processid的添加新的进程id #11")
              res[组件id].process_from[check_process_id]=new_lst;
              // console.log("为删除processid的添加新的进程id #12",new_lst)
              return res
            }
          }else{
            // console.log("为删除processid的添加新的进程id #7")
            let res={};
            // console.log("为删除processid的添加新的进程id #8")
            res[组件id]={process_id:check_process_id,process_from:{}};
            // console.log("为删除processid的添加新的进程id #9")
            let new_lst=JSON.parse(JSON.stringify(check_process_from[check_process_id]));
            // console.log("为删除processid的添加新的进程id #10")
            new_lst.push(组件id);
            // console.log("为删除processid的添加新的进程id #11")
            res[组件id].process_from[check_process_id]=new_lst;
            // console.log("为删除processid的添加新的进程id #12",new_lst)
            return res
          }
        }
      
      }}catch{}}


    },
    del_process_from:function(obj){
      let 输出组件_id=obj.out_id;
      let 输入组件_id=obj.in_id;
      let del_id=obj.del_id;
      let del_line=null;
      let 待处理列表=[];
      let del_temp_dct={};//存放删掉进程的组件id {组件id:true}
      let del_路径_dct={};//存放删掉的路径  {组件id:[进程id]}
        let res={
          delete_lst:[],
          postput:{}
        };
        if(!输入组件_id){
          待处理列表=this.del_process_from__x({
            flag:"删除组件",
            输出组件_id:输出组件_id
          });
          // console.log("要删除的进程#########初始化0:","删除组件",JSON.parse(JSON.stringify(待处理列表)))
        }else{
          del_line=[输出组件_id,输入组件_id];

          待处理列表=this.del_process_from__x({
            flag:"删除连线",
            输出组件_id:输出组件_id,
            输入组件_id:输入组件_id
          });
          
          // console.log("要删除的进程#########初始化0:","删除连线",JSON.parse(JSON.stringify(待处理列表)))
        }
        while (待处理列表.length){
          let obj=待处理列表.pop();
          // res.delete_lst.push(obj.组件id+'.process_from.'+obj.进程id);
          if(!del_路径_dct[obj.组件id]){del_路径_dct[obj.组件id]=[obj.进程id]}
          else{
            if(!del_路径_dct[obj.组件id].includes(obj.进程id)){

              del_路径_dct[obj.组件id].push(obj.进程id)
            }}
          // console.log("要删除的进程#########1:","delete_lst",JSON.parse(JSON.stringify(res.delete_lst)))
          if(this.flow_dict[obj.组件id].process_id==obj.进程id && del_id!=obj.组件id){
            res.postput[obj.组件id]={process_id:null}
            del_temp_dct[obj.组件id]=true;
          }
          let 待处理列表2=this.del_process_from__x({
            flag:"删除指定路径",
            路径:obj.路径,
            进程id:obj.进程id,
            组件id:obj.组件id,
          });
          // console.log("要删除的进程#########2:","删除指定路径",JSON.parse(JSON.stringify(待处理列表)))
          待处理列表 = [...待处理列表, ...待处理列表2];
        }
        //遍历要删除的
        for (let 组件id_ in del_路径_dct){
          if(组件id_==del_id){continue}
          for (let idx in del_路径_dct[组件id_]){
            let 进程id_=del_路径_dct[组件id_][idx];
            res.delete_lst.push(组件id_+'.process_from.'+进程id_);
          }
        }
        let while_true=true;
        let has_process_id={};
        let add_new_prcess={};
        while(while_true){
          while_true=false;
          //遍历要删除process_id的组件    重新获取process_id
          for (let 组件id in del_temp_dct){
            if(!has_process_id[组件id]){
              let new_process=this.del_process_from_get_process_id({
                del_路径_dct:del_路径_dct,
                del_id:del_id,
                组件id:组件id,
                add_new_prcess:add_new_prcess,
                del_line:del_line
              })
              if (new_process){
                while_true=true;
                has_process_id[组件id]=true;
                add_new_prcess[组件id]=JSON.parse(JSON.stringify(new_process[组件id].process_from));
                lhp_deepcopy1(res.postput,new_process);
              }
            }
          }

        }
        return res
      },
    
    get_process_lst_by_process_id:function(temp_id,process_id){
      return this.flow_dict[temp_id].process_from[process_id]
    },
    return_str:function(a){return Object.keys(a).sort().map(k => `${k}__${Object.keys(a[k]).sort((a, b) => a - b).join('_')}`).join('')},

    //建立连线后 建立相应的触发关系  【触发函数:如客户http请求后的回调函数   被动函数:如def a():return 's'可以随时调用的函数，一个是必须等客户请求后才会运行，一个是随时可以调用。当被动函数的传参由触发函数构成时，被动函数的类型转为触发函数。          设置这个触发类和被动类是后台解析数据时编排函数运行顺序时需要使用【在函数获取到所有触发函数传递过来的传参后，主动调用被动函数获取剩余的传参】
    set_tree_types:function(out_id,in_id){
      let out_temp=this.flow_dict[out_id];
      let lst=[];
      let res={};
      if (out_temp.tree_type=='1'){
        lst.push(
          {
            out_id:out_id,
            in_id:in_id,
            tree_from:out_temp.tree_from
          }
        )}
        
        while (lst.length>0){
          let pop_item=lst.pop()
          let now_out_id=pop_item.out_id;
          let now_in_id=pop_item.in_id;
          let tree_from=pop_item.tree_from;
          //如果目标已经为1 那么不处理
          if(this.flow_dict[now_in_id].tree_type=='1'){continue}
          else{
            //如果目标已经在新增 那么跳过
            if(res[now_in_id]){continue}
            let new_tree_from=JSON.parse(JSON.stringify(tree_from));
            new_tree_from.push(now_in_id);
            res[now_in_id]={
              tree_type:'1',
              tree_from:new_tree_from
            }
            //遍历目标的所有输出项 添加进待处理队列中
            let out_k=this.flow_dict[now_in_id].out_kwargs;
            if (out_k){
              for (let k in out_k){
                if (out_k[k].out_params){
                  for (let iin_id in out_k[k].out_params){
                    lst.push(
                      {
                        out_id:now_in_id,
                        in_id:iin_id,
                        tree_from:new_tree_from
                      })
                  }
                }
                
              }
            }
          }
           
              
              

        }
        return res
    },
    //删除组件 或者删除连线时 删除相应的触发关系  
    del_tree_types:function(obj){
      let del_id=obj.del_id;
      let del_line=obj.del_line;
      let out_id=obj.out_id;
      let in_id=obj.in_id;
      let out_temp=this.flow_dict[out_id];
      let lst=[];
      let del_dct={};
      let new_dct={};
      let res={
      }
      if(in_id){
        let in_temp=this.flow_dict[in_id];
        //删除的是一个连线 如果输入组件的tree_type来源于out 那么删除
        if(out_temp.tree_from && in_temp.tree_from && ((out_temp.tree_from.join("_")+"_"+in_id) == in_temp.tree_from.join("_"))){
          lst.push({
            out_id:in_id,
            tree_from:in_temp.tree_from
          })
        }
        del_line=[out_id,in_id]
      }else{
        //删除的是一个组件
        if(out_temp.tree_type=='1'){
          lst.push({
            out_id:out_id,
            tree_from:out_temp.tree_from
          })
        }
      }
      
        while (lst.length>0){
          let now_obj=lst.pop();
          if(now_obj.out_id!=del_id){
            res[now_obj.out_id]={
              tree_type:0,
              tree_from:null
            }
            del_dct[now_obj.out_id]=true;
          }
          //遍历输出项 添加入队列
          out_k=this.flow_dict[now_obj.out_id].out_kwargs
          let tree_from_str=now_obj.tree_from.join("_");
          if (out_k){
            for (let k in out_k){
              if (out_k[k].out_params){
                for (let iin_id in out_k[k].out_params){
                  let iin_data=this.flow_dict[iin_id];
                  if(iin_data.tree_type=='1'&& (tree_from_str+'_'+iin_id==iin_data.tree_from.join("_"))){
                    lst.push({
            out_id:iin_id,
            tree_from:iin_data.tree_from
                    })
                  }
                }
              }
              
            }
          }
        }

        //遍历删除的tree_from 重新获取tree_from
        let while_true=true;
        console.log("del_dct",del_dct)
        while(while_true){
          while_true=false;
          for(let now_del_id in del_dct){
            if(res[now_del_id].tree_type=='1'){continue}
            //遍历向此id输入的组件 查找是否有tree_type=1的组件 有的话 重新获取tree_from
            let in_k=this.flow_dict[now_del_id].in_kwargs;
            console.log("eeeeee 33",now_del_id,JSON.parse(JSON.stringify(in_k)))
            for(let i in in_k){
              try{
                check_id=in_k[i].in_params[0];
                console.log("eeeeee 1")
                if (check_id==del_id){continue}//如果来源为del_id则跳过
                console.log("eeeeee 2")
                if(del_line && del_line[0]==check_id && del_line[1]==now_del_id){continue}//如果来源为删除连线则跳过
                console.log("eeeeee 3")
                if(new_dct[check_id]){
                  while_true=true;
                  let new_tree_from=JSON.parse(JSON.stringify(new_dct[check_id]));
                  new_tree_from.push(now_del_id)
                  res[now_del_id]={
                    tree_type:'1',
                    tree_from:new_tree_from
                  }
                  new_dct[now_del_id]=new_tree_from;
                  break
                }
                console.log("eeeeee 4")
                if(this.flow_dict[check_id].tree_type=='1'){
                  if(del_dct[check_id]){continue}
                  while_true=true;
                  let new_tree_from=JSON.parse(JSON.stringify(this.flow_dict[check_id].tree_from));
                  new_tree_from.push(now_del_id)
                  res[now_del_id]={
                    tree_type:'1',
                    tree_from:new_tree_from
                  }
                  new_dct[now_del_id]=new_tree_from;
                  break
                }
                }catch{

                }
              }}}



        return res
    },
    _show_template:function(){

      // console.log('dddd')
      if (this.data.now_template_name){
        this.data.init_scroll();
        // console.log('dddd 2')
      let _html=`<${this.data.now_template_name} :db_indexr="db_indexr" var_name="${this.var_name2}":fullscreen="true" ></${this.data.now_template_name}>`
      //加载模板的名称
        // console.log('dddd 3')
        this.data.dom=this.$el.querySelector('.a_1_0_4_1_1')

        // this.data.dom=this.get_ref("edit");
        console.log("#############获取到的dom:",this.data.dom)
      // this.data.dom=this.$el.querySelector('.lhp_show_vue_template_____1_div_edit')
      this.data.dom.innerHTML=_html
      // console.log('dddd 4')
      new Vue({'el':this.data.dom,data:{true:true,is_edit:true,db_indexr:this.data.db_indexr}})
      // console.log('dddd 5')
      //更新数据
        // console.log('dddd 6')
        // this.data.get_config();
      // console.log('dddd 7')
    }
    },
    show_template:function(){
      ttime2(this.check_type,this._show_template,[],[])}
  }  ,//该属性 会自动生成watch data methods的属性  通过watch实现data

  mounted: function () {  
    
  _this.data.全局鼠标操作对象1=_this.deepcopy_data.全局鼠标操作对象1;
//   _this.data.全局鼠标操作对象1.set_up({
//     key:"拖拽后端组件",
//     key2:"鼠标up时回收dom",
//     func:_this.鼠标up时回收dom,
// });
    //设置缩放比 高度 宽度
    _this.data.更改scale=function(val){
      _this.data.scale=Number(val)/100;
      let left=-Number(_this.data.width.replace("px",""))*(1-_this.data.scale)/2;
      let top=-Number(_this.data.height.replace("px",""))*(1-_this.data.scale)/2;
      _this.data.write_style=`width:${_this.data.width};height:${_this.data.height};scale:${_this.data.scale};left:${left};top:${top};`;
    }
    _this.data.change_scale_info={"name":"缩放比","callback":_this.data.更改scale};
    _this.data.scale_key="2";
    _this.data.更改width=function(val){
      val=val.replace("px","");
      _this.data.width=Number(val)+'px';
      let left=-Number(_this.data.width.replace("px",""))*(1-_this.data.scale)/2;
      let top=-Number(_this.data.height.replace("px",""))*(1-_this.data.scale)/2;
      _this.data.write_style=`width:${_this.data.width};height:${_this.data.height};scale:${_this.data.scale};left:${left};top:${top};`;
      _this.data.change_width_info['hovertext']=_this.data.width;
    _this.data.width_key= _this.data.width_key==="104"?'103':'104';
    }
    
    _this.data.发起更改width请求=function(val){
      val=val.replace("px","");
      //更新数据 
      let update_val={
        "type":"change_data",
        type2:'更改width',
        now_select:_this.now_select,
        width:val,
        "path":"flow_chat_config.dict.1",
        "data_type":"set_list",//类型 修改数据
        "postput":[{
          
          'path':`flow_chat_config.dict.1.dict.${_this.now_select}.base_info`,
          'data':{
            width:val+'px',
          }
        }],
        }
        
        _this.data.全局配置对象.更新(update_val);
  }
  
    _this.data.change_width_info={"name":"宽度","callback":_this.data.发起更改width请求};
    _this.data.width_key="4";
    _this.data.更改height=function(val){
      val=val.replace("px","");
      _this.data.height=Number(val)+'px';
      let left=-Number(_this.data.width.replace("px",""))*(1-_this.data.scale)/2;
      let top=-Number(_this.data.height.replace("px",""))*(1-_this.data.scale)/2;
      _this.data.write_style=`width:${_this.data.width};height:${_this.data.height};scale:${_this.data.scale};left:${left};top:${top};`;
      
      _this.data.change_height_info['hovertext']=_this.data.height;
    _this.data.height_key= _this.data.height_key==="106"?'105':'106';
    }
    _this.data.发起更改height请求=function(val){
        //更新数据 
        let update_val={
          "type":"change_data",
          type2:'更改height',
          now_select:_this.now_select,
          height:val,
          "path":"flow_chat_config.dict.1",
          "data_type":"set_list",//类型 修改数据
          "postput":[{
            
            'path':`flow_chat_config.dict.1.dict.${_this.now_select}.base_info`,
            'data':{
              height:val+'px',
            }
          }],
          }
          
          _this.data.全局配置对象.更新(update_val);
    }
    _this.data.change_height_info={"name":"高度","callback":_this.data.发起更改height请求};
    _this.data.height_key="6";
    //设置当前选择的流程图
    _this.data.set_key= async function(path){
      console.log("当前选择.....",path)
      let path_lst=path.split(".");
      let flow_chat_config=_this.data.全局配置对象.update_obj.data.flow_chat_config.dict[1];
      _this.now_select=path_lst[path_lst.length-1];
      _this.flow_dict=flow_chat_config.dict[_this.now_select].flow_dict;
      _this.base_info=flow_chat_config.dict[_this.now_select].base_info;
      try{
        if (_this.base_info['run_flag']==true){
          _this.flow_type='运行中';
        }else{
          _this.flow_type='未运行';
        }
      }
      catch{
        _this.flow_type='未运行';
      }
      _this.process_dct=flow_chat_config.dict[_this.now_select].base_info.process_dct;
      _this.data.更改height(flow_chat_config.dict[_this.now_select].base_info.height);
      _this.data.更改width(flow_chat_config.dict[_this.now_select].base_info.width);
      console.log("绘制当前流程 start")
      await _this.data.绘制当前流程的数据();
      console.log("绘制当前流程 end")
      //绘制当前流程的界面
      console.log("当前选择now_select:",_this.now_select)
    }
    // //设置鼠标
    // _this.data.move_obj=new a_move_class();
    // //设置当 有组件拖拽进此画布时   画布的绘制函数
    // _this.data.write_move1=function(obj){
      

    // }
    // console.log("测试111-1")
    // _this.data.move_obj.set_move({
    //   'key':'拖拽组件',
    //   'func':_this.data.write_move1
    // })
    console.log("测试111-2")
    //创建新组件  设置当 有组件拖拽进此画布 鼠标释放后  要进行的操作
    _this.data.create_temp=function(obj){
      let event=obj.event;
      let params=obj.params;
      let data=obj.data;
      //获取到 鼠标所在画布的坐标
      // params={x:x,y:y,relative_leftright:relative_leftright,dom:this.$refs.write_dom};
      let temp_x=params.x-params.relative_leftright.left-30;
      let temp_y=params.y-params.relative_leftright.top-30;
      //获取到正在拖拽的组件参数
      let temp_info=JSON.parse(JSON.stringify(data.temp_info));
      if (!(temp_info.in_kwargs)){temp_info.in_kwargs={}}
      if (!(temp_info.tree_type)){temp_info.tree_type=0}
      temp_info.tree_type_from={}//当前组件的tree_type由哪些决定
      if (!(temp_info.tree_type_from)){temp_info.tree_type_from=0}
      try{
        for(let kk in temp_info.in_kwargs){
          temp_info.in_kwargs[kk].in_type1="0"//0表示固定传参 1表示组件传参 2表示配置设参
          temp_info.in_kwargs[kk].v0=temp_info.in_kwargs[kk].default//0表示固定传参 1表示组件传参 2表示配置设参
          temp_info.in_kwargs[kk].v1_=[null,null]//0表示固定传参 1表示组件传参 2表示配置设参
          temp_info.in_kwargs[kk].v2=""
          temp_info.in_kwargs[kk].in_type3='0'//0表示不强行转换类型
        }
      }
      catch{}
        temp_info.in_kwargs['-1']={
          "name": "flag",
          "note": "通过传入值来控制组件的运行顺序 不传值时表示按照默认方式运行",
          "default": "0",
          "type": "str",
          "in_type1": "0",
          "v0": "0",
          "v1_": [
              null,
              null
          ],
          "v2": "",
          "in_type3": "0"
      }
      if(!(temp_info.out_kwargs)){temp_info.out_kwargs={}}
      temp_info.out_kwargs['-1']={
        "name": "flag",
        "note": "通过传入值来控制组件的运行顺序 不传值时表示按照默认方式运行",
        "type": "str",
    }
        let update_params=[
          {//将路径为path的数据 进行 +1操作 并且存入属性add中 提供给data里面携带@add的属性调用
            name:'@add_index',
            path:`flow_chat_config.dict.${this.now_select}.flow_chat_base_info.idx`,//数据路径
            use:'++s'
          },
          
        ] 
        let postput=[
          {
            'path':`flow_chat_config.dict.1.dict.${this.now_select}.flow_dict.@add_index`,
            'data':temp_info
          },
          
          {
            'path':`flow_chat_config.dict.${this.now_select}.flow_chat_base_info`,
            'data':{"idx":"@add_index"}
          },
        ]
        
        temp_info['process_id']=null
        temp_info['process_from']={}
        //如果目标是进程创建类的组件  那么会新建新的进程id 以及进程名称 和可更改进程名的标志
        if (temp_info.temp_type=='process'){
          update_params.push(
            {
              name:'@add_process_id',
              path:`flow_chat_config.dict.${this.now_select}.flow_chat_base_info.process_idx`,
              use:"++s"
            }
          )
          postput.push({
            'path':`flow_chat_config.dict.${this.now_select}.flow_chat_base_info`,
            'data':{'process_idx':'@add_process_id',"process_dct":{"@add_process_id":temp_info.process_name||'未命名的进程名称'}}
          })
          
        temp_info['process_id']='@add_process_id'
        temp_info['process_change']=true
        temp_info['process_from']['@add_process_id']={'@add_index':["@add_index"]}//创建进程的组件的 进程id来源于自身


        }
        lhp_deepcopy1(temp_info,{
          temp_name:temp_info.name,
          x:event.clientX-rect.left-60,
          y:event.clientY-rect.top-60,
          out_idx:0,
          in_idx:0,
          out:{},
          in:{}
      })
        //更新数据
        let update_val={
          "type":"change_data",
          "data_type":"set_list",//类型 修改数据
          type2:"新增连线",
          update_params:update_params,
          "postput":postput,
        }
      _this.data.全局配置对象.更新(update_val);





    }
    // _this.data.move_obj.set_up({
    //   key:"拖拽组件",
    //   func:_this.data.create_temp,
    //   key2:"鼠标up创建组件"
    // })
    _this.data.显示当前绘制的连线=function(event){
      
    let xy2=_this.get_x_y2(event,"write_dom");
    let x2=Number((xy2['x']+event.clientX-30)/_this.data.scale);
    let y2=Number((xy2['y']+event.clientY-30)/_this.data.scale);
      let data=_this.data.全局鼠标操作对象1.get_data({
        key:"绘制当前连线"})
      let xy={x1:0,y1:0,x2:0,y2:0};


      a_1_0_4_1_1_line_add({
        father_dom:_this.$refs.write_dom,
        key:"当前绘制的连线",
        xy:xy
      });
      a_1_0_4_1_1_line_dct['当前绘制的连线'].vue.$el.style["display"]='none';
    }
    _this.data.移动当前绘制的连线=function(event){
    try{a_1_0_4_1_1_line_dct['当前绘制的连线'].vue.$el.style.removeProperty("display");}catch{}
    let xy2=_this.get_x_y2(event,"write_dom");
    
    let scrollX = _this.$refs.scroll.scrollLeft;
    let scrollY = _this.$refs.scroll.scrollTop;
    let x2=Number((xy2['x']+scrollX)/_this.data.scale);
    let y2=Number((xy2['y']+scrollY-10)/_this.data.scale);
      let data=_this.data.全局鼠标操作对象1.get_data({
        key:"绘制当前连线"})
      let xy={x1:data.x1,y1:data.y1,x2:x2,y2:y2};
// console.log("xys",xy)
      a_1_0_4_1_1_line_dct['当前绘制的连线'].vue.data.xy=JSON.stringify(xy);
    }
    _this.data.隐藏当前绘制的连线=function(event){
      a_1_0_4_1_1_line_dct['当前绘制的连线'].vue.$el.style["display"]='none';
      
      _this.data.全局鼠标操作对象1.unset_move({"key":"绘制当前连线",
        key2:"绘制当前连线move",});
    _this.data.全局鼠标操作对象1.unset_up({"key":"绘制当前连线",
        key2:"绘制当前连线up",});
      
        _this.data.全局鼠标操作对象1.set_data({
          key:"绘制当前连线",
          data:{
            write_flag:false
          }
      });
        
    }
    _this.data.移动后端组件up=function(event){
      
    let data=_this.data.全局鼠标操作对象1.get_data({
      key:"移动后端组件"})
      let new_x=data.x+(event.clientX-data.mousex)/_this.data.scale;
      let new_y=data.y+(event.clientY-data.mousey)/_this.data.scale;
      if(new_x<0){new_x=0}
      if(new_y<0){new_y=0}
      if(new_x>Number(_this.data.width.replace("px",""))){new_x=Number(_this.data.width.replace("px",""))-10}
      if(new_y>Number(_this.data.height.replace("px",""))){new_y=Number(_this.data.width.replace("px",""))-10}
      a_1_0_4_1_1_dom_dct[data.key].vue.data.x=new_x;
      a_1_0_4_1_1_dom_dct[data.key].vue.data.y=new_y;
        //更新数据
        let update_val={
          "type":"change_data",
          "type2":"移动组件",
          'key':data.key,
          'now_select':_this.now_select,
          "path":"flow_chat_config.dict.1",
          "data_type":"set_list",//类型 修改数据
          "postput":[
            {
              'path':`flow_chat_config.dict.1.dict.${_this.now_select}.flow_dict.${data.key.split("_")[1]}`,
              'data':{
                'x':new_x,
                'y':new_y
              }
            }],
        }
        _this.data.全局配置对象.更新(update_val);

      _this.data.全局鼠标操作对象1.unset_move({"key":"移动后端组件",
          key2:"移动后端组件move",});
      _this.data.全局鼠标操作对象1.unset_up({"key":"移动后端组件",
          key2:"移动后端组件up",});
      
  }
  //建立连接线 -呼起 输出参数名 和 输入参数名
  _this.data.建立连接线=function(data2){
    let data=_this.data.全局鼠标操作对象1.get_data({key:"绘制当前连线"});
    console.log("data.key",data.key,data2.key)
    let out_id=data.key.split("_")[1];
    let in_id=data2.key.split("_")[1];
    _this.now_out_id=out_id;
    _this.now_in_id=in_id;
    _this.now_in_key=data2.key;
    _this.now_out_key=data.key;
    console.log("_this.flow_dict",_this.flow_dict)
    let start_obj=_this.flow_dict[out_id];
    let end_obj=_this.flow_dict[in_id];
    
    console.log("in_id",in_id);
    console.log("out_id",out_id)
    if(out_id!=in_id){
      let start_out_kwargs={};
      let end_in_kwargs={};
      // console.log("?1")
      let in_kwargs=_this.flow_dict[in_id].in_kwargs;
      let out_kwargs=_this.flow_dict[out_id].out_kwargs;
      // console.log("?2")
      if(!out_kwargs){Vue.prototype.$notify({type: 'error',message: '输出组件没有出参'});return}
      if(!in_kwargs){Vue.prototype.$notify({type: 'error',message: '输入组件没有入参'});return}
      
    // console.log("in_kwargs",in_kwargs)
      for (let key in in_kwargs){
        if (!in_kwargs[key].in_params){end_in_kwargs[key]=in_kwargs[key].name;}
      }

      if(!(Object.keys(end_in_kwargs)).length){Vue.prototype.$notify({type: 'error',message: '输入组件入参不需要传递了'});return}
      for (let key in out_kwargs){
        start_out_kwargs[key]=out_kwargs[key].name;
      }
      // console.log("start_obj.name",start_obj.name)
      select2__({
        "title":`${start_obj.name}->${end_obj.name}`,
      "select1":start_out_kwargs,"select2":end_in_kwargs,
        callback:function(out_params_info){_this.data.生成连接线(out_params_info)}
      })
      
    }else{
      Vue.prototype.$notify({type: 'error',message: '不能传参给自身'});
    }
    _this.data.隐藏当前绘制的连线();
  }
  _this.data.生成连接线=function(out_params_info){
    
    let out_id=_this.now_out_id;
    let in_id=_this.now_in_id;
    
    let key1=out_params_info.key1//出参组件的 出参 id
    let key2=out_params_info.key2//入参组件的 入参 id
    //判断输出组件和输入组件是否已经拥有连线 
    let has_line=_this.check_line(out_id,in_id);
    //如果拥有连线 那么添加参数
    if (has_line.type==true){
      _this.add_line_params(out_id,in_id,has_line,out_params_info)
      return
    }
    //如果没有连线 那么建立连线
    // console.log(start_obj,end_obj)
    //1.更新 入参组件的 入参连线index计数
    //2.更新 入参组件的 入参连线 的数据
    let in_kwargs_data={}
    in_kwargs_data[key2]={"in_params":{}}
    in_kwargs_data[key2].in_type1='1'//0表示固定传参 1表示组件传参 2表示配置设参
    in_kwargs_data[key2].v1_=[out_id,key1]
                    //--------输出的key和value
    in_kwargs_data[key2]['in_params']=[out_id,key1,["@out_idx","@in_idx"]]
    //4.更新 出参组件的 出参连线index计数
    //5.更新 出参组件的 出参连线 的数据
    let out_kwargs_data={}
    out_kwargs_data[key1]={"out_params":{}}
                    //--------输出的key和value
    out_kwargs_data[key1]['out_params'][in_id]={}
    out_kwargs_data[key1]['out_params'][in_id][key2]={"key":["@out_idx","@in_idx"]}
    let postput={
      'path':`flow_chat_config.dict.1.dict.${_this.now_select}.flow_dict`,
      'data':{}
    }
    
    postput.data[out_id]={}
    lhp_deepcopy1(postput.data[out_id],{"out":{"@out_idx":{
                                                      "out_id":in_id,
                                                      "out_key":"@in_idx",}}})
    lhp_deepcopy1(postput.data[out_id],{"out_kwargs":out_kwargs_data})
    lhp_deepcopy1(postput.data[out_id],{"out_idx":"@out_idx"})
    postput.data[in_id]={}
    lhp_deepcopy1(postput.data[in_id],{"in":{
                                                                "@in_idx":{
                                                                  "in_id":out_id,
                                                                  "in_key":"@out_idx",
                                                                }
                                                            }})
    lhp_deepcopy1(postput.data[in_id],{"in_kwargs":in_kwargs_data})
    lhp_deepcopy1(postput.data[in_id],{"in_idx":"@in_idx"})
    //给进程上下绑定进程id
    console.log("给进程上下绑定进程id")
    let process_data=_this.set_process_from(out_id,in_id)
    lhp_deepcopy1(postput.data,process_data);
    //绑定tree_type
    console.log("给组件绑定tree_type")
    let tree_type_res=_this.set_tree_types(out_id,in_id)
    if(Object.keys(tree_type_res).length>0){
      lhp_deepcopy1(postput.data,tree_type_res)
    }
    console.log("开始处理 end")
//更新数据 
let update_val={
"type":"change_data",
type2:'新增连线',
out_id:out_id,
in_id:in_id,
out_key:_this.now_out_key,
in_key:_this.now_in_key,
"path":"flow_chat_config.dict.1",
"data_type":"set_list",//类型 修改数据
update_params:[
  {//将路径为path的数据 进行 +1操作 并且存入属性add中 提供给data里面携带@add的属性调用
    name:'@out_idx',
    path:`flow_chat_config.dict.1.dict.${_this.now_select}.flow_dict.${out_id}.out_idx`,//数据路径
    use:'++s'
  },
  {//将路径为path的数据 进行 +1操作 并且存入属性add中 提供给data里面携带@add的属性调用
    name:'@in_idx',
    path:`flow_chat_config.dict.1.dict.${_this.now_select}.flow_dict.${in_id}.in_idx`,//数据路径
    use:'++s'
  }, 
],
"postput":[postput],
}

_this.data.全局配置对象.更新(update_val);
}
_this.data.select_temp={};
_this.data.select_line={};
_this.data.clear_select=function(){
  console.log("开始清除 start")
  for (let k in _this.data.select_temp){
    try{a_1_0_4_1_1_dom_dct[k].vue.data.out_flag=false;}catch{}
    try{
      a_1_0_4_1_1_dom_dct[k].vue.data.in_flag=false;}catch{}
  }
  for (let k in _this.data.select_line){
    try{
      a_1_0_4_1_1_line_dct[k].vue.data.line_flag=false;}catch{}

  }
  _this.data.select_temp={};
  _this.data.select_line={};
  console.log("开始清除 end")
}
_this.data.start_select=function(key){
  console.log("开始选择 start")
  if(key.includes("=>")){
    console.log("key:",key,a_1_0_4_1_1_line_dct)
    let temp_lst=key.split("=>");
    _this.data.select_temp[temp_lst[0]]='out';
    a_1_0_4_1_1_dom_dct[temp_lst[0]].vue.data.out_flag=true;
    _this.data.select_temp[temp_lst[1]]='in';
    a_1_0_4_1_1_dom_dct[temp_lst[1]].vue.data.in_flag=true;
    _this.data.select_line[key]=true;
    a_1_0_4_1_1_line_dct[key].vue.data.line_flag=true;
  }else{
    _this.data.select_temp[key]='out';
    a_1_0_4_1_1_dom_dct[key].vue.data.out_flag=true;

  }
  console.log("开始选择 end")
}
_this.data.选择组件=function(key){
console.log("选择组件",key);
//消除之前的选择事情
_this.data.clear_select();
//添加当前的选择事件
_this.data.start_select(key);

window['浮动窗口当前显示'].set("后端组件属性窗口");
window['后端组件属性窗口'].now_select=_this.now_select;
window['后端组件属性窗口'].key=key;
}
_this.data.选择连线=function(key){
console.log("选择连线",key);
//消除之前的选择事件

_this.data.clear_select();
//添加当前的选择事件
_this.data.start_select(key);
//显示浮动窗口
window['浮动窗口当前显示'].set("后端连线属性窗口");
window['后端连线属性窗口'].now_select=_this.now_select;
window['后端连线属性窗口'].key=key;
}


  _this.data.修改组件名称=function(key,name){
    console.log("修改组件名称",key,name)
    let out_id=key.split("_")[1];//this.now_select_temp
    
    let update_val={
      "type":"change_data",
      "type2":"修改组件名称",
      'key':key,
      name:name,
      'now_select':_this.now_select,
      "path":"flow_chat_config.dict.1",
      "data_type":"set_list",//类型 修改数据
      "postput":[{
        'path':`flow_chat_config.dict.1.dict.${_this.now_select}.flow_dict.${out_id}`,
        'data':{'name':name}
      }]
    }
    _this.data.全局配置对象.更新(update_val);
  }
  _this.data.删除连线=function(key){
    let key_lst=key.split("=>");
    let out_id=key_lst[0].split("_")[1];
    let in_id=key_lst[1].split("_")[1];
    let out_key=null;in_key=null;
    //遍历out项 
    let out=_this.flow_dict[out_id].out;
    for(let idx in out){
      if (out[idx].out_id==in_id){
        out_key=idx;
        break;
      }
    }
    let in_=_this.flow_dict[in_id].in;
    for(let idx in in_){
      if (in_[idx].in_id==out_id){
       in_key=idx;
        break;
      }
    }

    let delete1={
      'delete_before':`flow_chat_config.dict.1.dict.${_this.now_select}.flow_dict`,
      'lst':[`${out_id}.out.${out_key}`,
        `${in_id}.in.${in_key}`

      ]
    }
    let delete_lst=[delete1]
    let postput={}
    let in_kwargs=_this.flow_dict[in_id].in_kwargs
    let out_kwargs=_this.flow_dict[out_id].out_kwargs
    //遍历in_id的key
    console.log("in_id的key",in_kwargs)
    for(let kk in in_kwargs){
      if (in_kwargs[kk].in_params&& in_kwargs[kk].in_params[0]==out_id){
        delete1.lst.push(
          `${in_id}.in_kwargs.${kk}.in_params`
        )
      }
    }
    //遍历out_id的key
    for(let kk in out_kwargs){
      if (out_kwargs[kk].out_params && out_kwargs[kk].out_params.hasOwnProperty(in_id)){
        delete1.lst.push(`${out_id}.out_kwargs.${kk}.out_params.${in_id}`
        )
      }
    }
    //更新数据
let update_val={
"type":"change_data",
"data_type":"set_list",//类型 修改数据
"type2":"删除连线",
"path":"flow_chat_config.dict.1",
key:key,
"delete2":delete_lst
}


      //删除进程id
      let process_dct=_this.del_process_from({
       in_id:in_id,
        out_id:out_id
      })
      console.log("删除连线关于删除的进程数据:",JSON.parse(JSON.stringify(process_dct)));
      if(process_dct.delete_lst.length){
        for (let iii=0;iii<process_dct.delete_lst.length;iii++){
          delete1.lst.unshift(process_dct.delete_lst[iii])
        }

      }
      if (Object.keys(process_dct.postput).length){
        lhp_deepcopy1(postput,process_dct.postput)
      }

  //解除tree_type绑定
      let tree_type_res=_this.del_tree_types({
        out_id:out_id,
        in_id:in_id
      })
      lhp_deepcopy1(postput,tree_type_res);
if (Object.keys(postput).length){
update_val.postput=[{path:`flow_chat_config.dict.1.dict.${_this.now_select}.flow_dict`,data:postput}]
}
console.log("del line postput",update_val.postput,postput)
_this.data.全局配置对象.更新(update_val);
  }
  _this.data.删除组件=function(key){
    let out_id=key.split("_")[1];//this.now_select_temp
      let value=_this.flow_dict[out_id];
      let delete1={
        'delete_before':`flow_chat_config.dict.1.dict.${_this.now_select}.flow_dict`,
        'lst':[
        ]
      }
      let delete_lst=[delete1]
      let postput={}
      //将绑定在这个组件上的连线全部删除
      //先删除输出连线
      console.log("删除组件-1")
      for (let out_key in value.out) {  
        delete1.lst.push(`${value.out[out_key].out_id}.in.${value.out[out_key].out_key}`
        ) 

        let ooout_id=value.out[out_key].out_id;
        let out_obj=_this.flow_dict[ooout_id].in_kwargs;
        for (let param_key in out_obj){
          if (out_obj[param_key].hasOwnProperty("in_params")&&out_obj[param_key]['in_params'][0]==out_id){
            delete1.lst.push(`${ooout_id}.in_kwargs.${param_key}.in_params`
            )
          }
        }
      }  

      console.log("删除组件-2")
      //再删除输入连线
      for (let in_key in value.in) {  
        delete1.lst.push(
         `${value.in[in_key].in_id}.out.${value.in[in_key].in_key}`
        ) 
        let iiin_id=value.in[in_key].in_id;
        let in_obj=_this.flow_dict[iiin_id].out_kwargs;
        for (let param_key in in_obj){
          if (in_obj[param_key].hasOwnProperty("out_params")&&in_obj[param_key]['out_params'].hasOwnProperty(out_id)){
            delete1.lst.push(
             `${iiin_id}.out_kwargs.${param_key}.out_params.${out_id}`
            )
          }
        }
      }  
      let update_val={
        "type":"change_data",
        "type2":"删除组件",
        'key':key,
        'now_select':_this.now_select,
        "path":"flow_chat_config.dict.1",
        "data_type":"set_list",//类型 修改数据
        "delete2":delete_lst
      }
      //删除组件
      delete1.lst.push(`${out_id}`)
      //删除进程id
      let process_dct=_this.del_process_from({
        del_id:out_id,
        out_id:out_id
      })
      console.log("要删除的进程:",JSON.parse(JSON.stringify(process_dct)));
      if(process_dct.delete_lst.length){
        for (let iii=0;iii<process_dct.delete_lst.length;iii++){
          delete1.lst.unshift(process_dct.delete_lst[iii])
        }

      }
      if (Object.keys(process_dct.postput).length){
        lhp_deepcopy1(postput,process_dct.postput)
      }
      console.log("删除组件-3")
    //解除tree_type绑定
    let treepostput=null
      //绑定tree_type
      let tree_type_res=_this.del_tree_types({
        del_id:out_id,
        out_id:out_id
      })
      lhp_deepcopy1(postput,tree_type_res);
      // if(tree_type_res!=null ){
      //   if ( Object.keys(tree_type_res.del_lst).length>0){
          
      //     for (let i=0;i< tree_type_res.del_lst.length;i++){
      //       delete1.lst.push(tree_type_res.del_lst[i].path)
      //   }
      //   }
        
      //   if (tree_type_res.postput){
      //     treepostput=tree_type_res.postput
      //   }
      // }
      
      console.log("删除组件-4")
      if(Object.keys(postput).length){
        update_val.postput=[{path:`flow_chat_config.dict.1.dict.${_this.now_select}.flow_dict`,data:{}}]
        lhp_deepcopy1(update_val.postput[0].data,postput)
      }
      if(treepostput){
        if(!update_val.postput){update_val.postput=[{path:`flow_chat_config.dict.1.dict.${_this.now_select}.flow_dict`,data:{}}]}
        lhp_deepcopy1(update_val.postput[0].data,treepostput)
      }
      console.log("删除组件-5")
    _this.data.全局配置对象.更新(update_val);
    
  }
  _this.data.移动后端组件move=function(event){
    let data=_this.data.全局鼠标操作对象1.get_data({
      key:"移动后端组件"})
      let new_x=data.x+(event.clientX-data.mousex)/_this.data.scale;
      let new_y=data.y+(event.clientY-data.mousey)/_this.data.scale;
      if(new_x<0){new_x=0}
      if(new_y<0){new_y=0}
      if(new_x>Number(_this.data.width.replace("px",""))){new_x=Number(_this.data.width.replace("px",""))-10}
      if(new_y>Number(_this.data.height.replace("px",""))){new_y=Number(_this.data.width.replace("px",""))-10}
      a_1_0_4_1_1_dom_dct[data.key].vue.data.x=new_x;
      a_1_0_4_1_1_dom_dct[data.key].vue.data.y=new_y;
      _this.data.更新目标连线(data.key);
  }
  _this.sleep=function sleep(ms) {  
    return new Promise(resolve => setTimeout(resolve, ms));  
}  

_this.data._init_dct={};
_this.data.get_out_xy_in_xy=function(flow_id){
  if(!_this.data._init_dct[flow_id]){
    let flow_id2=flow_id.split("_")[1];
    console.log("_this.flow_dict[flow_id].name",_this.flow_dict,flow_id,flow_id2)
    let obj=a_1_0_4_1_1_get_wh({
      'context':_this.flow_dict[flow_id2].name,
      'class':"a_1_0_4_1_1_class1 ddd"
    });
    let width=obj.width;
    let circle_style_left=width/2-6;
    let x=_this.flow_dict[flow_id2].x;
    let y=_this.flow_dict[flow_id2].y;
    _this.data._init_dct[flow_id]= {
      in_xy:{x:x+circle_style_left,y:y-12},
      out_xy:{x:x+circle_style_left,y:y+24}
    }
  }
  return _this.data._init_dct[flow_id]
}
    _this.data.绘制当前流程的数据=async function(){
        //清空内容
        _this.$refs.write_dom.innerHTML = '';
        a_1_0_4_1_1_clear();
        a_1_0_4_1_1_line_clear();
        _this.data._init_dct={};
        //遍历当前流程 将要添加内容存入列表
        let add_lst=[];
        let flow_keys=Object.keys(_this.flow_dict);
        for (let i=0;i<flow_keys.length;i++){
          let flow_id=flow_keys[i];
          let flow_data=_this.flow_dict[flow_id];
          let deepcopy_data=JSON.parse(JSON.stringify(flow_data));
          let key=`${_this.now_select}_${flow_id}`;
          deepcopy_data.key=key;
          deepcopy_data.father_data=_this.data;
          deepcopy_data.father=_this;
          deepcopy_data.id_=flow_id;
          //添加组件
          add_lst.push({
            data:{
              'key':key,
              'deepcopy_data':deepcopy_data,
              "vue_name":"a_1_0_4_1_1_buttonx",
              "father_dom":_this.$refs.write_dom,
            },
            "func":a_1_0_4_1_1_add,
          })

          try{
//遍历输出参数
let out_key=key;
let out=Object.keys(flow_data['out']);

for(let j=0;j<out.length;j++){
  let in_key=`${_this.now_select}_${flow_data['out'][out[j]].out_id}`;
  let out_xy=_this.data.get_out_xy_in_xy(out_key).out_xy;
  let in_xy=_this.data.get_out_xy_in_xy(in_key).in_xy;
  //添加连线
  add_lst.push({
  data:{
    'key':out_key+'=>'+in_key,
    "father_data":_this.data,
    "xy":{x1:out_xy.x,y1:out_xy.y,x2:in_xy.x,y2:in_xy.y},
    "father_dom":_this.$refs.write_dom,
  },
  "func":a_1_0_4_1_1_line_add,
})
}
          }catch(err){console.log("err"+err)
}
          

        }
        //停顿时间加载组件
        let count_max=50;count_start=0;
        while (add_lst.length){
            //等待页面刷新完成
            if ((count_start++)%count_max==0){
                await _this.sleep(20);
            }
            let t_obj=add_lst.pop();
            t_obj.func(t_obj.data);
        }
        a_1_0_4_1_1_refresh_all();
    }

    _this.data.协同数据处理=function(obj){
      console.log("后端流程可视化编辑界面 接收协同数据处理:",obj)
      if(obj.type2=='新增组件'){
        //创建组件
        let deepcopy_data=obj.postput[0].data;
        let path_lst=obj.postput[0].path.split(".");
        let key=path_lst[4]+'_'+path_lst[6];
        deepcopy_data.key=key;
        deepcopy_data.father_data=_this.data;
        deepcopy_data.father=_this;
        deepcopy_data.id_=path_lst[6];
        // console.log("_____this",_this.data.data,_this.now_select)
        // deepcopy_data.process_dct=_this.data.data.dict[_this.now_select].base_info.process_dct;
        a_1_0_4_1_1_add({
          key:key,
          father_dom:_this.$refs.write_dom,
          vue_name:"a_1_0_4_1_1_buttonx",
          deepcopy_data:deepcopy_data
        });
        
      // let flow_chat_config=_this.data.全局配置对象.update_obj.data.
      // flow_chat_config.dict.1.dict.${_this.now_select}.flow_dict;
      //   全局配置对象.注册(
      //     obj_data={
      //       _this:a_1_0_4_1_1_dom_dct[key].vue,//vue对象
      //       other_callback:{},//其他监听回调
      //       path:'flow_chat_config',//注册路径 /将此数据绑定到组件上
      //       type:"try3", // 报错不删除此注册[运行 func报错时不直接删除该注册对象]
      //       vname:"",// 将接收的的完整数据保存到   vue对象.data[vname]
      //       func:function(ee){//将接收的的完整数据保存到   vue对象.data[vname]后 要执行的函数
      //       }
      //     })
        // console.log("_this.",_this)
      }else if(obj.type2=="移动组件"){
        if(obj.now_select==_this.now_select){
          a_1_0_4_1_1_dom_dct[obj.key].vue.data.x=obj.postput[0].data['x'];
          a_1_0_4_1_1_dom_dct[obj.key].vue.data.y=obj.postput[0].data['y'];
          
          _this.data.更新目标连线(obj.key);
        }

      }else if(obj.type2=='删除组件'){
        _this.data.删除目标连线(obj.key);
        a_1_0_4_1_1_del(obj.key);
        a_1_0_4_1_1_refresh_all();
      }else if(obj.type2=='新增连线'){
        let out_key=obj.out_key;
        let in_key=obj.in_key;
        console.log("开始创建连线！",out_key,in_key,a_1_0_4_1_1_dom_dct)
        let out_xy=window.a_1_0_4_1_1_dom_dct[out_key].vue.return_circle_xy2();
        let in_xy=window.a_1_0_4_1_1_dom_dct[in_key].vue.return_circle_xy1();
        console.log("out_xy,in_xy",out_xy,in_xy)
          a_1_0_4_1_1_line_add(
              {
                key:out_key+'=>'+in_key,
                father_data:_this.data,
                xy:{x1:out_xy.x,y1:out_xy.y,x2:in_xy.x,y2:in_xy.y},
                father_dom:_this.$refs.write_dom
              }
          )
          a_1_0_4_1_1_refresh_all();
      }else if(obj.type2=='修改组件名称'){
        window.a_1_0_4_1_1_dom_dct[obj.key].vue.refresh_func();
        _this.data.更新目标连线(obj.key);
      }else if(obj.type2=='更改width'){
        if(_this.now_select==obj.now_select){
          _this.data.更改width(obj.width.replace("px",""));
        }
      }else if(obj.type2=='更改height'){
        if(_this.now_select==obj.now_select){
          _this.data.更改height(obj.height.replace("px",""));
        }
      }else if(obj.type2=='删除连线'){
        console.log("删除目标连线！")
        _this.data.删除目标连线(obj.key);
        a_1_0_4_1_1_refresh_all();
      }else if(obj.type2=="启停流程"){
        if (obj.flow_id==_this.now_select){
          if(obj.flow_type==true){
            _this.flow_type="运行";
            _this.flow_type_key= _this.flow_type_key=="ff2"?"ff1":"ff2";
          }else{
            _this.flow_type="未运行";
            _this.flow_type_key= _this.flow_type_key=="ff2"?"ff1":"ff2";
          }
      // flow_type_key:"ff1",
      // flow_type:'未运行',
        }
      }
    }
    _this.data.更新目标连线=function(key){
      // console.log("更新.")
      //获取当前流程id  和  组件id
      let temp_v=key.split("_");
      let flow_id=temp_v[0];
      let temp_id=temp_v[1];
      if (flow_id!==_this.now_select){return}//如果不是当前流程图 那么取消
      //获取目标入参位置
      let in_xy=window.a_1_0_4_1_1_dom_dct[key].vue.return_circle_xy2();
      let in_x=in_xy.x,in_y=in_xy.y;
      //获取目标出参位置
      let out_xy=window.a_1_0_4_1_1_dom_dct[key].vue.return_circle_xy1();
      let out_x=out_xy.x,out_y=out_xy.y;
      //获取目标 所有输出到入参的 id
      let in_dcts=_this.flow_dict[temp_id].in;
      let out_dcts=_this.flow_dict[temp_id].out;
      let out_lst=[];
      let in_lst=[];
      for (let k in in_dcts){
        let idx=flow_id+'_'+in_dcts[k].in_id;
        out_lst.push([idx,window.a_1_0_4_1_1_dom_dct[idx].vue.return_circle_xy2()]);
      }
      for (let k in out_dcts){
        let idx=flow_id+'_'+out_dcts[k].out_id;
        in_lst.push([idx,window.a_1_0_4_1_1_dom_dct[idx].vue.return_circle_xy1()]);
      }
      for(let i=0;i<in_lst.length;i++){
        window.a_1_0_4_1_1_line_dct[key+'=>'+in_lst[i][0]].vue.data.xy=JSON.stringify({x2:in_lst[i][1].x,y2:in_lst[i][1].y,x1:in_x,y1:in_y})
      }
      for(let i=0;i<out_lst.length;i++){
        // console.log("key+'=>'+out_lst[i][0]]",key+'=>'+out_lst[i][0])
        window.a_1_0_4_1_1_line_dct[out_lst[i][0]+'=>'+key].vue.data.xy=JSON.stringify({x1:out_lst[i][1].x,y1:out_lst[i][1].y,x2:out_x,y2:out_y})
      }
    }
    _this.data.删除目标连线=function(key){
      for(k in window.a_1_0_4_1_1_line_dct){
        if(k.includes(key)){
          window.a_1_0_4_1_1_line_del(k)
        }
      }
    }
    //上传更改数据
    //新增组件
    _this.data.新增组件=function(event,info){
      
    let xy=_this.get_x_y2(event,"write_dom")
    console.log("拖拽进来的组件数据:",info)
      //   // console.log("mouseup2")
      //   // let new_key=Object.keys(this.info_dct).reduce((max, current) => Math.max(max, current), -Infinity)+1;
      //   // console.log("mouseup3",new_key)
      //   let rect = this.$refs.scroll.getBoundingClientRect();  
      let temp_info=JSON.parse(JSON.stringify(info));
      if (!(temp_info.in_kwargs)){temp_info.in_kwargs={}}
      if (!(temp_info.out_kwargs)){temp_info.out_kwargs={}}
        if (!(temp_info.tree_type)){temp_info.tree_type=0}
        temp_info.tree_type_from={}//当前组件的tree_type由哪些决定
        if (temp_info.tree_type==0){
          temp_info.tree_from=null;
        }else{
          temp_info.tree_from=['@add_index'];
        }
        // if (!(temp_info.tree_type_from)){temp_info.tree_type_from=0}

        try{
          for(let kk in temp_info.in_kwargs){
            if(!temp_info.in_kwargs[kk].in_type1){temp_info.in_kwargs[kk].in_type1="0";}//0表示固定传参 1表示组件传参 2表示配置设参
            if(!temp_info.in_kwargs[kk].v0){temp_info.in_kwargs[kk].v0=temp_info.in_kwargs[kk].default;}//0表示固定传参 1表示组件传参 2表示配置设参
            if(!temp_info.in_kwargs[kk].v1_){ temp_info.in_kwargs[kk].v1_=[null,null];}//0表示固定传参 1表示组件传参 2表示配置设参
            if(!temp_info.in_kwargs[kk].v2){temp_info.in_kwargs[kk].v2="";}//0表示固定传参 1表示组件传参 2表示配置设参
            if(!temp_info.in_kwargs[kk].in_type3){temp_info.in_kwargs[kk].in_type3='0'}///0表示不强行转换类型
            
          }
        }
        catch{}
        temp_info.in_kwargs['-1']={
          "name": "flag",
          "note": "通过传入值来控制组件的运行顺序 不传值时表示按照默认方式运行",
          "default": "0",
          "type": "str",
          "in_type1": "0",
          "v0": "0",
          "v1_": [
              null,
              null
          ],
          "v2": "",
          "in_type3": "0"
      }
      if (!temp_info.no_out_kwargs){
        temp_info.out_kwargs['-1']={
          "name": "flag",
          "note": "将传入的flag值输出",
          "default": "0",
          "type": "str",
      }

      }
        let update_params=[
          {//将路径为path的数据 进行 +1操作 并且存入属性add中 提供给data里面携带@add的属性调用
            name:'@add_index',
            path:`flow_chat_config.dict.1.dict.${_this.now_select}.base_info.index`,//数据路径
            use:'++s'
          },
          
        ] 
        let postput=[
          {
            'path':`flow_chat_config.dict.1.dict.${_this.now_select}.flow_dict.@add_index`,
            'data':temp_info
          },
          
          {
            'path':`flow_chat_config.dict.1.dict.${_this.now_select}.base_info`,
            'data':{"index":"@add_index"}
          },
        ]
        
        temp_info['process_id']=null
        temp_info['process_from']={}
        //如果目标是进程创建类的组件  那么会新建新的进程id 以及进程名称 和可更改进程名的标志
        if (temp_info.temp_type=='process'){
          update_params.push(
            {
              name:'@add_process_id',
              path:`flow_chat_config.dict.1.dict.${_this.now_select}.base_info.process_idx`,
              use:"++s"
            }
          )
          postput.push({
            'path':`flow_chat_config.dict.1.dict.${_this.now_select}.base_info`,
            'data':{'process_idx':'@add_process_id',"process_dct":{"@add_process_id":temp_info.process_name||'未命名的进程名称'}}
          })
          
        temp_info['process_id']='@add_process_id';
        temp_info['process_change']=true;
        temp_info['process_from']['@add_process_id']=["@add_index"];//创建进程的组件的 进程id来源于自身


        }
        // 获取滚动偏移量

        let scrollX = _this.$refs.scroll.scrollLeft;
        let scrollY = _this.$refs.scroll.scrollTop;
        console.log("获取到的滚动偏移量",scrollX,scrollY)
        lhp_deepcopy1(temp_info,{
          temp_name:temp_info.name,
          x:Number((xy['x']+scrollX-30)/_this.data.scale),
          y:Number((xy['y']+scrollY-30)/_this.data.scale),
          out_idx:0,
          in_idx:0,
          out:{},
          in:{}
      })
        //更新数据
        let update_val={
          "type":"change_data",
          "type2":"新增组件",
          "path":"flow_chat_config.dict.1",
          "data_type":"set_list",//类型 修改数据
          update_params:update_params,
          "postput":postput,
        }
        _this.data.全局配置对象.更新(update_val);
    }
    //添加新的组件
    // _this.data.add();
    //添加新的连接
    
    //清空所有内容

    //按照选择的










    this.project_post=request______({method:'post',url:'/run_flow',error_run_func:function(data){if (data.error_code==1){window.location.href = '/login';}}})
    this.url_params=get_url_params()

      if (_this.show_flag){_this.data.show_flag=_this.show_flag}
      // console.log('test',_this.$el)
      _this.data.set_template=function(template_name){
        console.log("数据库html可视化 设置template_name",template_name);
        _this.data.now_template_name=template_name
        _this.show_template()
      }
    _this.data.change_db_indexr=function(db_indexr){
      console.log("数据库html可视化 设置dbindexr",db_indexr);
      _this.data.db_indexr=db_indexr}
    
    _this.data.init_scroll=function(){

      var scrollableElement = _this.get_ref("scroll");
  window.scrollableElement=scrollableElement;
      // 确保元素有滚动条  
      if (scrollableElement.scrollHeight > scrollableElement.clientHeight) {  
      // 设置滚动位置  
        scrollableElement.scrollTop =(scrollableElement.scrollHeight - scrollableElement.clientHeight) / 2;
      }
      if(scrollableElement.scrollWidth>scrollableElement.clientWidth){
        scrollableElement.scrollLeft = (scrollableElement.scrollWidth-scrollableElement.clientWidth)/2; 
      }
    }
    
  document.addEventListener('click', this.handleGlobalClick);
    //初始化滚动轴
    ttime3(_this,'scroll',_this.data.init_scroll);
  },
  beforeDestroy() {
    // 确保在组件销毁前移除监听器
    document.removeEventListener('click', this.handleGlobalClick);
  },
} 
  );
  


Vue.component2('a_1_0_4_3_1', {  
    template: `
<div style="width:100%;height:100%" v-if="data.show_flag" :key="refresh">

  <div class="a_1_0_4_3_1_title">
    <div style="color:#bcbcbc">连线属性编辑框</div>
  </div>

  <div class="a_1_0_4_3_1_container">
    <div class="a_1_0_4_3_1_left">出参id
    </div>
    <div class="a_1_0_4_3_1_right">{{data.out_id}}
    </div>
  </div>

  <div class="a_1_0_4_3_1_container">
    <div class="a_1_0_4_3_1_left">入参id</div>
    <div class="a_1_0_4_3_1_right">{{data.in_id}}</div>
  </div>
  <div class="a_1_0_4_3_1_container">
    <div class="a_1_0_4_3_1_left">出参名称</div>
    <div class="a_1_0_4_3_1_right">{{data.out_name}}</div>
  </div>
  <div class="a_1_0_4_3_1_container">
    <div class="a_1_0_4_3_1_left">入参名称</div>
    <div class="a_1_0_4_3_1_right">{{data.in_name}}</div>
  </div>

  <div  class="a_1_0_4_3_1_container" @click="add"><div style="font-size:30px">+</div></div>
  <div v-for="(item,indexr) in data.put_data">
    <div class="a_1_0_4_3_1_container">
      <div class="a_1_0_4_3_1_left">{{item[0]}}</div>
      <div class="a_1_0_4_3_1_center">&gt;</div>
      <div class="a_1_0_4_3_1_right">{{item[1]}}</div>

    </div>
  </div>


</div>
`,  
  data(){  
    return {  
      refresh:'1',
      data:{
        old_out_md5:'',
        old_in_md5:'',

        now_select:'1',//当前选择的
        key:'',
        flow_data:{},
        show_flag:false,
        out_id:'1',
        in_id:'1',
        put_data:[],
        out_name:"333",
        in_name:"333",

      }
    }    

},
watch:{
  'data.key':function(e){
    this.data.out_id=e.split("=>")[0].split("_")[1];
    this.data.in_id=e.split("=>")[1].split("_")[1];
    try{
      console.log("start refresh 1")
      this.data.old_out_md5=md5(JSON.stringify(this.data.flow_data.dict[this.data.now_select].flow_dict[this.data.out_id]));
      this.data.old_in_md5=md5(JSON.stringify(this.data.flow_data.dict[this.data.now_select].flow_dict[this.data.in_id]));
      console.log("start refresh 2")
      this.init();
    }catch{}
  },
'data.show_flag':function(e){
// if(e){

// }
},
  'data.flow_data': {
    handler(newVal, oldVal) {
      if(!this.data.show_flag){return}
      let new_out_md5=null;
      let new_in_md5=null;
      try{
        new_out_md5=md5(JSON.stringify(this.data.flow_data.dict[this.data.now_select].flow_dict[this.data.out_id]));
        new_in_md5=md5(JSON.stringify(this.data.flow_data.dict[this.data.now_select].flow_dict[this.data.in_id]));
        this.flow_dict=this.data.flow_data.dict[this.data.now_select].flow_dict;
      }catch{
        this.data.show_flag=false;
        this.refresh_func();
        return
      }
      if(new_out_md5!=this.data.old_out_md5 || new_in_md5!=this.data.old_in_md5){
        this.init();
      }
      // console.log('User object changed:');
      // console.log('Old Value:', oldVal);
      // console.log('New Value:', newVal);
    },
    deep: true,
  }
},
methods:{
  
  check_line(out_id,in_id){
      
    let start_obj=this.flow_dict[in_id]
    let start_obj_in_kwargs=start_obj.in_kwargs;
    for (let kk in start_obj_in_kwargs){
      if (start_obj_in_kwargs[kk].in_params && start_obj_in_kwargs[kk].in_params[0]==out_id){
        return {"type":true,'data':start_obj_in_kwargs[kk].in_params[2]}
      }
    }
    return {"type":false}
  },//在已有连线的组件上进行连线
  add_line_params(out_id,in_id,check_line_res,out_params_info){
let _this=this;
    let key1=out_params_info.key1//出参组件的 出参 id
    let key2=out_params_info.key2//入参组件的 入参 id
    //1.更新 入参组件的 入参连线index计数
    //2.更新 入参组件的 入参连线 的数据
    let in_kwargs_data={}
    in_kwargs_data[key2]={"in_params":{},"in_type1":"1",'v1_':[out_id,key1]}
                    //--------输出的key和value
    in_kwargs_data[key2]['in_params']=[out_id,key1,check_line_res.data]
    //4.更新 出参组件的 出参连线index计数
    //5.更新 出参组件的 出参连线 的数据
    let out_kwargs_data={}
    out_kwargs_data[key1]={"out_params":{}}
                    //--------输出的key和value
    out_kwargs_data[key1]['out_params'][in_id]={}
    out_kwargs_data[key1]['out_params'][in_id][key2]={"key":check_line_res.data}
//更新数据 
let update_val={
"type":"change_data",
"data_type":"set_list",//类型 修改数据
update_params:[
  {
    name:"检查目标元素是否存在 存在则不执行该操作",
    path:`flow_chat_config.dict.1.dict.${this.data.now_select}.flow_dict.${in_id}.in_kwargs.${key2}.in_params`,
    message:"已经拥有此传参了",
    use:"check_true"
  }
],
"postput":[
  {
    'path':`flow_chat_config.dict.1.dict.${this.data.now_select}.flow_dict.${out_id}.out_kwargs`,
    'data':out_kwargs_data
  },
  //更新
  {
    'path':`flow_chat_config.dict.1.dict.${this.data.now_select}.flow_dict.${in_id}.in_kwargs`,
    'data':in_kwargs_data
  },
],
}
_this.data.全局配置对象.更新(update_val);
  },
  add_func:function(out_params_info){
    let _this=this;
    let has_line=_this.check_line(this.data.out_id,this.data.in_id);
    //如果拥有连线 那么添加参数
    if (has_line.type==true){
      _this.add_line_params(this.data.out_id,this.data.in_id,has_line,out_params_info)
  }},
  refresh_func:function(){
    this.refresh=this.refresh==='2'?'1':'2';
  },
  init:function(){
    let return_flag=false;
    if(!this.data.flow_data.dict[this.data.now_select] || !this.data.flow_data.dict[this.data.now_select]){return_flag=true}
    this.flow_dict=this.data.flow_data.dict[this.data.now_select].flow_dict;
    console.log("start_init:::::")
    //获取组件名称
    let out_dct=this.flow_dict[this.data.out_id];
    let in_dct=this.flow_dict[this.data.in_id];
    if(!out_dct || !in_dct){return_flag=true}
    if(return_flag){
      this.data.show_flag=false;
      this.refresh_func();
      return
    }

    this.data.out_name=out_dct.name;
    this.data.in_name=in_dct.name;
    //获取组件传递的参数关系
    let temp_put_data=[];
    for(let k in out_dct.out_kwargs){
      let out_params=out_dct.out_kwargs[k].out_params;
      if(out_params && out_params[this.data.in_id]){
        let temp_d=out_params[this.data.in_id];
        for(let k2 in temp_d){
          temp_put_data.push(
            [out_dct.out_kwargs[k].name,in_dct.in_kwargs[k2].name]
          )
        }
      }
    }
    
    this.data.put_data=temp_put_data;
    if(!this.data.put_data.length){
      this.data.show_flag=false;
    }
    // console.log("start_init::eeeee")
    this.refresh_func();
  },
  add:function(){
    let _this=this;
    let start_out_kwargs={};
      let end_in_kwargs={};
      // console.log("?1")
      let in_kwargs=this.flow_dict[this.data.in_id].in_kwargs;
      let out_kwargs=this.flow_dict[this.data.out_id].out_kwargs;
      // console.log("?2")
      if(!out_kwargs){Vue.prototype.$notify({type: 'error',message: '输出组件没有出参'});return}
      if(!in_kwargs){Vue.prototype.$notify({type: 'error',message: '输入组件没有入参'});return}
      
    // console.log("in_kwargs",in_kwargs)
      for (let key in in_kwargs){
        if (!in_kwargs[key].in_params){end_in_kwargs[key]=in_kwargs[key].name;}
      }

      if(!(Object.keys(end_in_kwargs)).length){Vue.prototype.$notify({type: 'error',message: '输入组件入参不需要传递了'});return}
      for (let key in out_kwargs){
        start_out_kwargs[key]=out_kwargs[key].name;
      }
    select2__({
      "title":`${ this.data.out_name}->${this.data.in_name}`,
    "select1":start_out_kwargs,"select2":end_in_kwargs,
      callback:function(out_params_info){_this.add_func(out_params_info)}
    })
  }
},
mounted:function(){
}
}
);



Vue.component2('a_1_0_4_4_1_menu2', {  
  template: `
      <div class="a_1_0_4_4_1_menu_bar" :key="refresh"  :style="'width:'+data.width">
          <div class="a_1_0_4_4_1_activity_item" v-for="(menu_id, index) in data.fast_menu" :key="index" @click="selectActivity(menu_id)" :class="{ a_1_0_4_4_1_active: menu_id == selectedActivity }"@mouseover="showSubMenu(menu_id)" @mouseleave="hideSubMenu(menu_id)">
              <span :class="data.menus[menu_id].menu_class"></span>
              <div class="a_1_0_4_4_1_sub_menu" v-if="menu_id==show_menu">
                  <div class="a_1_0_4_4_1_menu_item">
                      {{data.menus[menu_id].menu_name}}
                  </div>
              </div>
          </div>
      </div>
`,  
data() {
    return {
      
      show_menu:"-1",
      selectedActivity:'0',
      refresh:"1",/*用来刷新组件*/
      data:{
          width:"100%",
          menu_str:'',
          menus: {

      },
      fast_menu:[],//存放menus ids的数组 ids被转为整数 按照sort顺序排列
      show_flag:{}
      }
       
    };
},
watch:{
'data.menu_str':function(e)
{
  _this.menus=JSON.parse(e);
  _this.refresh_func();//刷新组件
}},
methods: {
  showSubMenu(menu_id) {
      if (this.show_menu!=menu_id){
          this.show_menu=menu_id;
          // console.log(this.show_menu)
          this.refresh=this.refresh=="2"?"1":"2";
      }
  },
  hideSubMenu(menu_id) {
      this.show_menu=null;
      this.refresh=this.refresh=="2"?"1":"2";
  },
  selectActivity(id) {
      this.selectedActivity = id;
      try{this.data.menus[this.selectedActivity].func(this.selectedActivity);}
      catch{console.log("点击菜单后出错！")
}
  },

},
mounted:function(){
  //调用此函数刷新整个组件
  _this.refresh_func=function(){
      //创建菜单目录 快速查找数组
      _this.data.fast_menu=(Object.keys(_this.data.menus).map(Number)).sort();
      _this.refresh=_this.refresh=="2"?"1":"2";
  }

  
    //设置选项
    _this.data.set_menu=function(obj){
      /*
      var_name:全局变量 【window[var_name]】
      menu_id:选项id
      menu_name:选项名称
      menu_class:选项类
      menu_keys:选项快捷方式
      */
     let menu_id=obj.menu_id;
     let var_name=obj.var_name;
     let menu_name=obj.menu_name;
     let menu_class=obj.menu_class;
     let menu_keys=obj.menu_keys;
     let func=obj.func;
     //如果已经拥有这个目录 那么仅修改名称
     if (_this.data.menus.hasOwnProperty(menu_id)){
      _this.data.menus[menu_id]['menu_name']=menu_name;
      _this.data.menus[menu_id]['menu_class']=menu_class;
      _this.data.menus[menu_id]['menu_keys']=menu_keys;
      _this.data.menus[menu_id]['func']=func;
     }else{
      //如果没有拥有则新建一个
      _this.data.menus[menu_id]={
          "menu_name":menu_name,
          "menu_keys":menu_keys,
          "var_name":var_name,
          "menu_class":menu_class,
          "func":func,
      }
     }
     _this.refresh_func();//刷新组件
    },
    _this.data.选择=_this.selectActivity;
    //绑定快捷方式对象
    _this.data.bind_fast_obj=function(fast_obj){
      /*快捷方式通过全局 快捷方式对象进行调用*/
    }
}
} 
);

Vue.component2('a_1_0_4_4_1_menu', {  
  template: `
     
      <div class="a_1_0_4_4_1_sub_menu" :style="lefttop" :key='refresh' v-show='show_flag'>
          <div class="a_1_0_4_4_1_sub_menu_item" ref="text"v-for="(key,indexr) in data.keys" @click="click($event,key)">
              {{data.menu_dct[key].text}}
          </div>
      </div>
`,
data(){
  return{
      show_flag:true,
      refresh:'1',
      lefttop:'color:red',
      data:{
          menu_dct:{
          },
          keys:{},
          x:'33',
          y:'33',
      }
  }
},
watch:{
  
  "data.x":function(e){
      this.lefttop=`left:${this.data.x};top:${this.data.y};`
  },
  "data.y":function(e){
      this.lefttop=`left:${this.data.x};top:${this.data.y};`
  },
},
methods:{
  
  click:function(event,key){
      this.data.menu_dct[key].click(event);
      this.show_flag=false;
  },
},

mounted:function(){
_this.data.refresh=function(){_this.refresh='2'?'1':'2'};
_this.data.keys=_this.deepcopy_data.keys;
_this.data.x=_this.deepcopy_data.x;
_this.data.y=_this.deepcopy_data.y;
_this.data.menu_dct=_this.deepcopy_data.menu_dct;_this.data.refresh();
}

})
window.a_1_0_4_4_1_dom=null;//表示菜单的dom
window.a_1_0_4_4_1_vue=null;//表示菜单的dom
window.a_1_0_4_4_1_show_menu=function(obj){

let x=null;
let y=null;
if(obj.event){
    x=obj.event.clientX;
    y=obj.event.clientY;
}else{
    x=obj.x;
    y=obj.y;
}
let deepcopy_data={"menu_dct":obj.menu_dct,'keys':Object.keys(obj.menu_dct).sort(),x:x,y:y}
//如果菜单不存在则创建一个菜单
if(!a_1_0_4_4_1_dom){
let new_dom=document.createElement('a_1_0_4_4_1_menu');
//设置dom属性 ref值为ref_obj
new_dom.setAttribute('ref','ref_obj');
new_dom.setAttribute(':deepcopy_data','deepcopy_data');
//设置vue
let vue_dct={'el':new_dom,data:{true:true,false:false,null:null,deepcopy_data:deepcopy_data}};
// 将这个 div 添加到 document.documentElement（即 <html> 元素）  
document.documentElement.appendChild(new_dom);
//渲染vue组件
window.a_1_0_4_4_1_vue=new Vue(vue_dct);
window.a_1_0_4_4_1_dom=new_dom;

document.addEventListener('click', function(event) {
  // Check if the clicked element is not doma and not a descendant of doma
  if (!window.a_1_0_4_4_1_vue.$refs.ref_obj.$el.contains(event.target)) {
    console.log("隐藏")
      window.a_1_0_4_4_1_vue.$refs.ref_obj.show_flag=false;
  }
});
}else{
    window.a_1_0_4_4_1_vue.$refs.ref_obj.data.keys=Object.keys(obj.menu_dct).sort();
    window.a_1_0_4_4_1_vue.$refs.ref_obj.data.menu_dct=obj.menu_dct;
    window.a_1_0_4_4_1_vue.$refs.ref_obj.data.x=x;
    window.a_1_0_4_4_1_vue.$refs.ref_obj.data.y=y;
    window.a_1_0_4_4_1_vue.$refs.ref_obj.data.refresh();
    window.a_1_0_4_4_1_vue.$refs.ref_obj.show_flag=true;

}

}
// a_1_0_4_4_1_show_menu(
// {
//     menu_dct:{
//         '0':{
//             'text':"删除",
//             'click':function(){console.log("???");
//},
//         },
//         '1':{
//             'text':"查看",
//             'click':function(){console.log("2???");
//},
//         },
//     },
//     x:444,y:444,
// }
// )
Vue.component2('a_1_0_4_4_1_base_select', {  
    template: `
<div ref="div"class="a_1_0_4_4_1_base_select_div" v-if="data.show_flag"  @click="clickk">
</div>
`,  

  data(){  

    return {  
      checked:true,
        data:{
          callback:null,
          params:null,
          now_color:'red',//'#3498db',//背景颜色
          show_flag:true,//是否显示
          absolute:null,//0表示左上 1表示右上 2表示左下 3表示右下
          absolute_style:"",
          ul_style:"",
          select_flag:false,//下拉选择标志
          menu_dct:{
          '0':{
              'text':"删除",
              'click':function(){console.log("???");
},
          },
          '1':{
              'text':"查看",
              'click':function(){console.log("2???");
},
          },}
        }
        ,
    }    

},
watch:{//监听输入框的变化
    "data.absolute":function(v){
      if (v==1){
          let node=this.$refs.div;
          node.style.borderLeft=`20px solid transparent`
          node.style.borderBottom=`0 solid transparent`
          node.style.borderRight=`0 solid transparent`
          node.style.borderTop=`20px solid #3498db`
          node.style.borderColor=`${this.data.now_color} transparent transparent`
      }
    },
    "data.now_color":function(v){
      let node=this.$refs.div;
          node.style.borderColor=`${v} transparent transparent`

    }
}, 
    methods: {  
      // select_li(kkk){
        
      //       console.log('base_select callback',kkk)
      //   this.data.callback(kkk)
      //     try{
      //       this.data.callback(kkk)
      //       // console.log('base_select callback end')
      //       }catch{}
      //     this.select_flag=false;
      // },
      clickk(event){
a_1_0_4_4_1_show_menu(
{
    menu_dct:this.data.menu_dct,
    event:event
}
);
event.stopPropagation();
      },
      
    },  
  }
);
Vue.component2('a_1_0_4_4_1', {  
  template: `
<div style="width:100%;height:100%;
    min-width: 300px;" v-show="data.show_flag" :key="refresh">

<div class="a_1_0_4_4_1_title">
  <div style="color:#bcbcbc">组件属性编辑框</div>
</div>
<a_1_0_4_4_1_menu2 ref="menu" :deepcopy_data="deep_menu" :key="refresh_menu"></a_1_0_4_4_1_menu2>

<!-- ------------这里是显示属性内容的--------start--------- -->
<div v-show="show_0">
  <div class="a_1_0_4_4_1_container">
    <div class="a_1_0_4_4_1_left">所属进程</div>
    <div class="a_1_0_4_4_1_right">{{show_1_data.process_name}}[{{show_1_data.process_id}}]</div>
  </div>
  <div class="a_1_0_4_4_1_container">
    <div class="a_1_0_4_4_1_left">组件名称</div>
    <div class="a_1_0_4_4_1_right">{{show_1_data.name}}</div>
  </div>
  <div class="a_1_0_4_4_1_container">
    <div class="a_1_0_4_4_1_left">组件id</div>
    <div class="a_1_0_4_4_1_right">{{show_1_data.id_}}</div>
  </div>

  <div class="a_1_0_4_4_1_container">
    <div class="a_1_0_4_4_1_left">组件模板名称</div>
    <div class="a_1_0_4_4_1_right">{{show_1_data.temp_name}}</div>
  </div>
  <div class="a_1_0_4_4_1_container">
    <div class="a_1_0_4_4_1_left">组件版本</div>
    <div class="a_1_0_4_4_1_right">{{show_1_data.version}}</div>
  </div>
  <div class="a_1_0_4_4_1_container">
    <div class="a_1_0_4_4_1_left">版本名称</div>
    <div class="a_1_0_4_4_1_right">{{show_1_data.version_name}}</div>
  </div>

</div>
<!-- ------------这里是显示属性内容的-------end--------- -->
<!-- ------------这里是显示入参内容的-------start--------- -->
<div v-show="show_1" :key="show_1_key">
  <div class="a_1_0_4_4_1_container" v-for="(item,indexr) in show_2_data.data">
    <div style="width: 40%; position: relative;
    height: 100%;
      align-items: center;
    display: flex;
    border-right: 1px solid #2b2b2b;overflow: hidden;">
    <span class="icon iconfont icon-bangzhu" style="margin-right:3px;cursor: pointer;"  @click="showTextDialog(item.note)"></span>
    <a_1_0_4_4_1_base_select :deepcopy_data="{'absolute':'1','now_color':item.color,'menu_dct':item.menu_dct}"></a_1_0_4_4_1_base_select>
    
    {{item.name}}</div>
    <div style="width: 40%; position: relative;height: 100%;
    border-right: 1px solid #2b2b2b;overflow: hidden;">
    
    {{item.val}}</div>
    <div class="width: 20%; position: relative;">{{item.type}}</div>
  </div>
  

</div>
<!-- ------------这里是显示入参内容的-------end--------- -->
<!-- ------------这里是显示出参内容的-------start--------- -->
<div v-show="show_2">
  <div class="a_1_0_4_4_1_container"style=" position: relative" v-for="(item,indexr) in show_3_data.data"
  
    @mouseleave="mouseleave_(item)"
@mouseenter="mouseenter_(item)"
  >
    <div style=" position: relative;">
    <span class="icon iconfont icon-bangzhu" style="margin-right: 3px;cursor: pointer;
    display: inline;" @click="showTextDialog(item.note)"></span>
    {{item.name}}</div>
    <div :key="item.key"  v-show="item.show_flag" >
      <div class="a_1_0_4_4_1_sub_menu2" v-for="(item2,indexr2) in item.lst":style="item2.style" >
          <div class="a_1_0_4_4_1_menu_item" >
              {{item2.val}}
          </div>
      </div>
    </div>
  </div>

</div>

<!-- ------------这里是显示出参内容的-------end--------- -->

    <el-dialog
      title="提示"
      :visible.sync="textDialogVisible"
      width="30%"
      @close="textDialogVisible = false">
      <!-- 对话框内容 -->
      <span>{{ dialogText }}</span>
      <span slot="footer" class="dialog-footer">
        <el-button @click="textDialogVisible = false">确 定</el-button>
      </span>
    </el-dialog>
</div>
`,  
data(){  
  return {  
    textDialogVisible:false,
    dialogText:'',
    color_dct:{
      "固定传参":"#80847e",
      "组件传参":"#55929e",
      "配置设参":"#ab9f64"
    },
    show_1_key:'101',
    refresh_menu:'33',
    deep_menu:'',
    now_show_id:0,
    show_0:true,
    show_1:false,
    show_2:false,
    refresh:'1',
    show_1_data:{
      process_name:'',//所属进程名称
      process_id:'',//所属进程id
      id_:'1',//组件id
      name:'',//组件名称
      temp_name:'',//组件模板名称
      version:'',//组件版本
      version_name:'',//版本名称
    },
    show_2_data:{
      data:[]
    },
    show_3_data:{
      data:[]
    },
    data:{
      old_md5:'',
      now_select:'1',//当前选择的
      key:'',
      id:'',
      show_flag:false,
    }
  }    

},
watch:{
'data.key':function(e){
  let _this=this;
  this.data.id=e.split("_")[1];
  console.log("???1")

  console.log("???2")
  this['refresh_show_'+this.now_show_id]();
  console.log("???3")
},
'data.show_flag':function(e){
  let _this=this;
  if(!_this.__init__x){
    // _this.deep_menu={
    //   0:{
    //     menu_name:'属性',
    //     menu_class:'icon iconfont icon-shuxing', 
    //     func:_this.data.show_menu_func   
    //   },
    //   1:{
    //     menu_name:'入参',
    //     menu_class:'icon iconfont icon-rucan', 
    //     func:_this.data.show_menu_func   
    //   },
    //  2:{
    //     menu_name:'出参',
    //     menu_class:'icon iconfont icon-chucan', 
    //     func:_this.data.show_menu_func   
    //   },
    // }
    // _this.refresh_menu
    try{
      _this.$refs.menu.data.set_menu({
        menu_id:0,
        menu_name:'属性',
        menu_class:'icon iconfont icon-shuxing', 
        func:_this.data.show_menu_func   
      })
      
      _this.$refs.menu.data.set_menu({
        menu_id:1,
        menu_name:'入参',
        menu_class:'icon iconfont icon-rucan', 
        func:_this.data.show_menu_func       
      })
      
      _this.$refs.menu.data.set_menu({
        menu_id:2,
        menu_name:'出参',
        menu_class:'icon iconfont icon-chucan', 
        func:_this.data.show_menu_func     
      })
    }catch{}
    
    _this.__init__x=true;
  }
},
'data.flow_data': {
  handler(newVal, oldVal) {
    if(!this.data.show_flag){return}
    try{
      let md5_val=md5(JSON.stringify(this.data.flow_data.dict[this.data.now_select]));
      this.data.flow_data.dict[this.data.now_select].flow_dict[this.data.id]
      if(md5_val!=this.data.old_md5){
        this.data.old_md5=md5_val;
        this['refresh_show_'+this.now_show_id]();
      }
    }catch{
      this.data.show_flag=false;
    }
  },
  deep: true,
},
},
methods:{
  showTextDialog(text) {
    this.dialogText = text;
    this.textDialogVisible = true;
  },
  mouseleave_:function(item){
  item.show_flag=false;
  let t=item.key.split("_");
  item.key=t[0]+'_'+t[1]==='2'?'1':'2';
  },
  mouseenter_:function(item){
    item.show_flag=true;
    let t=item.key.split("_");
    item.key=t[0]+'_'+t[1]==='2'?'1':'2';
  },
refresh_func:function(){
  this.refresh=this.refresh==='2'?'1':'2';
},
refresh_show_0:function(){
  let dct=this.data.flow_data.dict[this.data.now_select].flow_dict[this.data.id];
  this.show_1_data.process_id=dct.process_id;
  this.show_1_data.process_name=this.data.flow_data.dict[this.data.now_select].base_info['process_dct'][dct.process_id]||'无';
  this.show_1_data.name=dct.name;
  this.show_1_data.id_=this.data.id;
  this.show_1_data.temp_name=dct.temp_name;
  this.show_1_data.version=dct.version;
  this.show_1_data.version_name=dct.version_name;
},
设置为固定传参:function(k,value){
  //更新数据
  let update_val={
    "type":"change_data",
    "data_type":"set_list",//类型 修改数据
    "postput":[{
      'path':`flow_chat_config.dict.1.dict.${this.data.now_select}.flow_dict.${this.data.id}.in_kwargs.${k}`,
      'data':{'in_type1':'0','v0':value}
    }],
  }
  this.data.全局配置对象.更新(update_val);
},
设置为固定传参_呼起修改栏:function(k){
  this.$prompt('请输入固定传参内容', '提示', {
    confirmButtonText: '确定',
    cancelButtonText: '取消',
  }).then(({ value }) => {
    this.设置为固定传参(k,value);
  }).catch(() => {
    this.$message({
      type: 'info',
      message: '取消输入'
    });       
  });
},
设置为组件传参:function(k){
  //更新数据
  let update_val={
    "type":"change_data",
    "data_type":"set_list",//类型 修改数据
    "postput":[{
      'path':`flow_chat_config.dict.1.dict.${this.data.now_select}.flow_dict.${this.data.id}.in_kwargs.${k}`,
      'data':{'in_type1':'1'}
    }],
  }
  this.data.全局配置对象.更新(update_val);
},
设置为配置设参:function(k,value){
  //更新数据
  let update_val={
    "type":"change_data",
    "data_type":"set_list",//类型 修改数据
    "postput":[{
      'path':`flow_chat_config.dict.1.dict.${this.data.now_select}.flow_dict.${this.data.id}.in_kwargs.${k}`,
      'data':{'in_type1':'2','v2':value}
    }],
  }
  this.data.全局配置对象.更新(update_val);
},
设置为配置设参_呼起修改栏:function(k){
  this.$prompt('请输入配置设参内容', '提示', {
    confirmButtonText: '确定',
    cancelButtonText: '取消',
  }).then(({ value }) => {
    this.设置为配置设参(k,value);
  }).catch(() => {
    this.$message({
      type: 'info',
      message: '取消输入'
    });       
  });
},
refresh_show_1:function(){
  let _this=this;
  let in_type1_dct={
    0:"固定传参",
    1:"组件传参",
    2:"配置传参"
  }
  let dct=_this.data.flow_data.dict[_this.data.now_select].flow_dict[_this.data.id];
//计算入参
let temp_lst=[];
let sort1=Object.keys(dct.in_kwargs).sort();
  for (let k in sort1){
    let ddct=dct.in_kwargs[sort1[k]];
    let push_data={
      name:ddct.name,
      in_type1:ddct.in_type1,
      type:ddct.type,
      note:ddct.note,
      menu_dct:{
                '0':{
                    'text':"固定传参",
                    'click':function(){_this.设置为固定传参_呼起修改栏(sort1[k])},
                },
                '1':{
                    'text':"组件传参",
                    'click':function(){_this.设置为组件传参(sort1[k])},
                },
                '2':{
                    'text':"配置设参",
                    'click':function(){_this.设置为配置设参_呼起修改栏(sort1[k])},
                },
            }
     };
     push_data.in_type1_name=in_type1_dct[ddct.in_type1];

     if(ddct.in_type1=='0'){
      push_data.val=ddct.v0;
      push_data.color=_this.color_dct['固定传参'];
    }else if(ddct.in_type1=='1'){
      try{
        let out_dct=_this.data.flow_data.dict[_this.data.now_select].flow_dict[ddct.v1_[0]];
        push_data.val=out_dct.name+'.'+out_dct.out_kwargs[ddct.v1_[1]].name;
      }catch{
        push_data.val='error';
      }
      push_data.color=_this.color_dct['组件传参'];
      console.log("组件传参",push_data)
    }else if(ddct.in_type1=='2'){
   
      push_data.color=_this.color_dct['配置设参'];
   push_data.val=ddct.v2;
  }
  temp_lst.push(push_data);
  }
  _this.show_2_data.data=temp_lst;
  _this.show_1_key=_this.show_1_key==='102'?'101':'102';
},
refresh_show_2:function(){
  let _this=this;
  let flow_dct=_this.data.flow_data.dict[_this.data.now_select].flow_dict;
  let dct=flow_dct[_this.data.id];
  let temp_lst=[];

  
let sort1=Object.keys(dct.out_kwargs).sort();
for (let k=0;k<sort1.length;k++){
  let ddct=dct.out_kwargs[sort1[k]];
  
  let push_obj={
    name:ddct.name,
    note:ddct.note,
    show_flag:false,
    key:sort1[k]+'_'+'1',
    lst:[]
  };
  temp_lst.push(push_obj);
    if (ddct.out_params){
      let sort2=Object.keys(ddct.out_params).sort();
      if (!sort2.length){continue}
      for(let k2=0;k2<sort2.length;k2++){
        let ddct2=flow_dct[sort2[k2]];
        let temp___=ddct.out_params[sort2[k2]];
        let sort3=Object.keys(temp___).sort();
        for(let k3=0;k3<sort3.length;k3++){
          push_obj.lst.push(
            {
              style:`top:${25+push_obj.lst.length*44.8}px`,
              val:ddct2.name+'.'+ddct2.in_kwargs[sort3[k3]].name+`[${sort2[k2]}.${sort3[k3]}]`
            }
            
          );
        }
      }
      
    }
  }
  _this.show_3_data.data=temp_lst;
},
},

mounted:function(){
  
  _this.data.show_menu_func=function(menu_id){
    console.log("click",menu_id)
    if(_this.now_show_id==menu_id){return}
    else{
      _this['show_'+_this.now_show_id]=false;
      _this.now_show_id=menu_id;
      _this['show_'+_this.now_show_id]=true;
      
      _this['refresh_show_'+_this.now_show_id]();
    }
  }
  _this.data.menu=_this.$refs.menu;
  // window.tttttttttt=_this.$refs.menu
},
}
);



//设置当前选择的页面图
//建立连接线 -呼起 输出参数名 和 输入参数名
//创建组件
//绘制当前页面的界面
//_this.data.新增组件
///---------------绘制连接线的函数-------------------//

// {
//   1:{base_info:{},dict:{xx}}
// }

let ________getQueryParams=function() {  
  const queryParams = {};  
  const urlParams = new URLSearchParams(window.location.search);  
  for (const [key, value] of urlParams.entries()) {  
      queryParams[key] = value;  
  }  
  return queryParams; 
}  
window.a_1_0_4_5_1_create_temp=async function(obj){
  let ffffather_id=obj.father_id;
  console.log("father_id############test1",ffffather_id)
  await obj._this.now_dom_dct[ffffather_id].vue.$nextTick(() => {
    console.log("father_id############test2",ffffather_id)
    a_1_0_4_5_1_create_temp2(obj);
    console.log("father_id############test3",ffffather_id)
  }) 
}
window.a_1_0_4_5_1_create_temp2=function(obj){
  let 组件__only_id=obj.唯一id;
  let 组件id=obj.组件id;
  let 组件数据=obj.数据;
  let info=JSON.parse(JSON.stringify(组件数据.base_info));
  let _this=obj._this;
  if(_this.now_dom_dct[组件id]){return}
  let before_id=obj.before_id;
  let ref_val=obj.ref_val;
  let father_id=obj.father_id;
  //创建组件
  let new_dom=document.createElement(info.temp_id+'_'+info.version);
  for (let k in info){
    if (k!='data'){
      new_dom.setAttribute(k,info[k]);
    }
  }
  new_dom.id=组件__only_id;//`id_${项目所有者id}_${项目目录id}_${项目id}_${页面id}_${组件id}`;
  new_dom.setAttribute('dom_id',组件id);//${组件id}`;
  new_dom.setAttribute('ref','ref_obj');//设置ref
  let deepcopy_data=JSON.parse(JSON.stringify(info.data||{}));
if (before_id) {
  console.log("father_id",father_id)
  console.log("now id",组件id)
  if(!_this.now_dom_dct[father_id].vue.return_slot_dom){
    _this.now_dom_dct[father_id].vue.$refs[ref_val].insertBefore(new_dom,_this.now_dom_dct[before_id].dom);
  }else{
    let father_d=_this.now_dom_dct[father_id].vue.return_slot_dom(ref_val);
    father_d.insertBefore(new_dom,_this.now_dom_dct[before_id].dom);
  }
} else {
  console.log("father_id2",father_id)
  console.log("now id2",组件id)
  if(!_this.now_dom_dct[father_id].vue.return_slot_dom){
    _this.now_dom_dct[father_id].vue.$refs[ref_val].appendChild(new_dom);
  }else{
    let father_d=_this.now_dom_dct[father_id].vue.return_slot_dom(ref_val);
    father_d.appendChild(new_dom);
  }
  // 如果 child_dom 是 null，则将新元素添加到 father_dom 的末尾
}
// console.log("新增组件2")
let vue_dct={'el':new_dom,data:{true:true,false:false,null:null}};
//如果使用了vuetify 那么添加进来
if(info.use_vue){
  for(let i=0;i<info.use_vue.length;i++){
    vue_dct[info.use_vue[i]]=window[info.use_vue[i]];
  }
}
// //设置vue传入参数
new_dom.setAttribute(':deepcopy_data',"deepcopy_data");
deepcopy_data.edit_flag=true;//设置为编辑属性
vue_dct.data.deepcopy_data=deepcopy_data;
let new_vue=new Vue(vue_dct);
let new_vue2=new_vue.$refs.ref_obj;
_this.now_dom_dct[组件id]={'dom':new_vue2.$el,"vue":new_vue2,'father_id':father_id,'ref_val':ref_val}

}


window.a_1_0_4_5_1_create=async function(obj){


let 容器=obj.容器;
let 页面id=obj.页面id;
let 配置=obj.配置;
let _this=obj._this;
console.log("显示页面-","1:整理页面数据");
let 整理后的数据格式={};
let 当前页面的数据=JSON.parse(JSON.stringify(配置.page_config.dict[1].dict[页面id].dict[1].page_dict[1].dict));
//遍历节点 生成
let k_lst=Object.keys(当前页面的数据).reverse();

for(let i=k_lst.length-1;i>=0;i--){
  let k=k_lst[i];
  let 组件数据=当前页面的数据[k];
  console.log("组件数据:",i,组件数据)
  //判断组件是是否是根组件 //是否是容器的子节点【不是孙子节点】
  if(组件数据.base_info.father_id=='-1'){
    整理后的数据格式[k]=组件数据;
  }else{
    当前页面的数据[组件数据.base_info.father_id].dict[k]=组件数据;
  }
  }
console.log('\t\t',整理后的数据格式)
console.log("显示页面-","2:清空容器内所有的dom节点");
容器.innerHTML="";
console.log("显示页面-","3:依次生成节点");

  let project_info=________getQueryParams();//获取项目信息
  let 项目所有者id=project_info.user_id;
  let 项目目录id=project_info.project_dir;
  let 项目id=project_info.project_id;
  let create_lst=[{base_info:{con_dct:配置.page_config.dict[页面id].dict[1].dict[1].base_info.con_dct},dict:整理后的数据格式}];//要加载的组件
  while(create_lst.length){
    let 临时数据=create_lst.pop();
    let con_dct=临时数据.base_info.con_dct;
    for(let ref_name in con_dct){
      let 
    }
    await a_1_0_4_5_1_create_temp({
      唯一id:`id_${项目所有者id}_${项目目录id}_${项目id}_${页面id}_${k}`,
      组件id:k,
      数据:临时数据,
      _this:_this,
      before_id:null,
      ref_val:临时数据.ref,
    })
    if(临时数据.base_info.con){

    }
  }
console.log("显示页面-","1:清空容器内所有的dom节点");
}


window.a_1_0_4_5_1_create=async function(obj){

let 页面id=obj.页面id;
let 配置=obj.配置;
let _this=obj._this;
let 当前页面的数据=JSON.parse(JSON.stringify(配置.page_config.dict[1].dict[页面id].dict[1].page_dict));
let base_node={};//根节点
for(let k in 当前页面的数据){
  let 数据=当前页面的数据[k];
  if (数据.base_info.father_id=='-1'){
    base_node[k]=数据;
  }
}
  let project_info=________getQueryParams();//获取项目信息
  let 项目所有者id=project_info.user_id;
  let 项目目录id=project_info.project_dir;
  let 项目id=project_info.project_id;
  let 初始数据=JSON.parse(JSON.stringify(配置.page_config.dict[1].dict[页面id].dict[1]));
  
  初始数据.__临时id__="-1";
  let create_lst=[初始数据];//要加载的组件
  while(create_lst.length){
    let 临时数据=create_lst.pop();
    let con_dct=临时数据.base_info.con_dct;
    for(let ref_name in con_dct){
      let ref_lst=con_dct[ref_name].reverse();
      let before_id=null;
      for (let i=0;i<ref_lst.length;i++){
        let 组件id=ref_lst[i];
        let create_obj={
          唯一id:`id_${项目所有者id}_${项目目录id}_${项目id}_${页面id}_${组件id}`,
          组件id:组件id,
          数据:当前页面的数据[组件id],
          _this:_this,
          before_id:before_id,
          ref_val:ref_name,
          father_id:临时数据.__临时id__||"-1"
        };
        console.log("加载 1",create_obj)
        await a_1_0_4_5_1_create_temp(create_obj);
        console.log("加载 2",create_obj)
        before_id=组件id; 
        console.log("加载 3",临时数据,临时数据.base_info.con)
        if(当前页面的数据[组件id].base_info.con){
          
          当前页面的数据[组件id].__临时id__=组件id;
          create_lst.push(当前页面的数据[组件id]);
          console.log("加载 4",create_lst)
        }
      }
    }
  }
}
/*
a_1_0_4_5_1_create({
  页面id:1,
  配置:全局配置对象.update_obj.data,
  _this:前端可视化编辑界面.return_this()
})
  */
Vue.component2('a_1_0_4_5_1button',{
  template:`
  <div style="padding:7.5px"
      @mouseenter="handleMouseEnter"  
      @mouseleave="handleMouseLeave">

      <button ref="range" class="a_1_0_4_5_1button" @click="change_val">{{data.hovertext}}</button>

        <div class="a_1_0_4_5_1_sub_menu" :style="hovertext_style">
            <div class="a_1_0_4_5_1_sub_menu_item" ref="text">
              {{data.name}}:{{data.hovertext}}
            </div>
        </div>


  </div>
  `, 
  data() {
      return {
        refresh:"1",
        show_flag:true,
        hover_flag:false,
        style:{},
        hovertext_style:"top:-100;visibility:hidden;",
        style2:"",
        data:{
            test:false,
            val:100,
            add_show:true,
            icon_class:"",//图标类
            icon_color:"rgba(231, 231, 231, 0.6)",//图标颜色
            background:"#212121",//背景颜色
            hovercolor:"#ffffff",//高亮颜色
            name:"宽度:",
            hovertext:"2000px",//移动到位后的提示文字
            click:null,//点击触发函数
        }
      };
  },
  watch:{
  },
  methods:{
    
    change_val:function(){
      let _this=this;
      _this.$prompt('修改'+this.data.name, '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
      }).then(({ value }) => {
        try{_this.showValue(value);}
        catch (err){
            console.log("出错..",err)
        }
        
      }).catch(() => {
        _this.$message({
          type: 'info',
          message: '取消输入'
        });       
      });
    },
    
    
    accumulateParentOffsets:function (targetElement) {  
    let currentElement = targetElement;  
    let totalLeft = 0;  
    let totalTop = 0;  
  
    while (currentElement && currentElement.nodeType === Node.ELEMENT_NODE) {  
        const computedStyle = window.getComputedStyle(currentElement);  
          
        if (computedStyle.position === 'relative') {  
            // 注意：offsetLeft 和 offsetTop 给出的是相对于最近的定位祖先的偏移  
            // 在这里，我们假设没有其他的定位祖先（或它们不影响我们的计算）  
            // 因为我们只关心 relative 定位的父元素  
            totalLeft += currentElement.offsetLeft;  
            totalTop += currentElement.offsetTop;  
        }  
  
        currentElement = currentElement.parentElement;  
    }  
  
    return { left: totalLeft, top: totalTop };  
} ,
    showValue(val){
      this.data.val=val;
      this.data.hovertext=val+'px';
      try{this.data.callback(this.data.val)}catch{};
    },
    get_rect(){
      let rect=this.$refs.range.getBoundingClientRect();

  // console.log('Top:', rect.top);
  // console.log('Left:', rect.left);
  // console.log('Bottom:', rect.bottom);
  // console.log('Right:', rect.right);
  // console.log('Width:', rect.width);
  // console.log('Height:', rect.height);
      return rect
    },
    handleMouseEnter(){  
        if(this.hover_flag==false){
            this.hover_flag=true; 
            let rect=this.get_rect();
            let oobj=this.accumulateParentOffsets(this.$refs.range);
            this.hovertext_style=`top:${rect.top-oobj.top-40};left:${rect.left-oobj.left}`;
        }
      },  
      handleMouseLeave() {  
        if(this.hover_flag==true){
            this.hover_flag=false; 
            this.hovertext_style="top:-100;visibility:hidden;";
        }
      } ,
  },
  mounted:function(){
} }
);


Vue.component2('a_1_0_4_5_1button2',{
  template:`
  <div >

      <button ref="range" class="a_1_0_4_5_1button" @click="click_func">{{data.name}}</button>



  </div>
  `, 
  data() {
      return {
        data:{
          click:null,
            name:"运行控制",
        }
      };
  },
  watch:{
  },
  methods:{
    click_func:function(){
      let _this=this;
      try{this.data.click();}catch{}
    }
  },
  mounted:function(){
} }
);


function a_1_0_4_5_1_get_div() { 
	let res=document.getElementById("a_1_0_4_5_1");
    if(!res){
    res = document.createElement('div');  
    res.id = 'a_1_0_4_5_1'; // 为div设置一个唯一的ID  
    
    res.style.visibility = 'hidden'; // 初始设置为隐藏，但不影响尺寸计算  
    res.style.position = 'absolute'; // 设置为绝对定位，避免影响其他元素布局（可选） 
    res.style.display = 'none'; //隐藏 
    document.body.appendChild(res);
    }
      
    return res;  
}  
  
// 通过传参设置div的样式，并输出div的高度和宽度  
function a_1_0_4_5_1_get_wh(obj) {  
    let styles=obj.styles||{};
    let class_=obj.class||'';
    let context=obj.context||'';
    let res=a_1_0_4_5_1_get_div();
    
    // 清除除visibility和position之外的所有样式  
    for (let style in res.style) {  
        if (style !== 'visibility' && style !== 'position' ) { 
            res.style.removeProperty(style);  
        }  
    }  
    res.style.visibility = 'hidden'; // 初始设置为隐藏，但不影响尺寸计算  
    res.style.position = 'absolute'; // 设置为绝对定位，避免影响其他元素布局（可选） 
    // 设置div的样式  
    for (let property in styles) {  
        if (styles.hasOwnProperty(property)) {  
            res.style[property] = styles[property];  
        }  
    }  
    res.className=class_;
    res.textContent=context;
    // 获取div的高度和宽度（包括padding和border，但不包括margin）  
    let height = res.offsetHeight;  
    let width = res.offsetWidth;  
  
    res.style.display = 'none'; //隐藏
    // 输出高度和宽度  
    console.log(`Div的高度: ${height}px`);  
    console.log(`Div的宽度: ${width}px`);  
  
    return { height:height, width:width }; // 返回高度和宽度（可选）  
}  
  
// 使用示例  
// a_1_0_4_5_1_get_wh({
// styles:{
//     backgroundColor: 'lightblue',  
//     border: '1px solid black',  
//     padding: '10px'
// },
// context:'33333',
// class:'ddd'
// });
////----------------------绘制右击菜单---------start------------/////////
window.a_1_0_4_5_1_dom=null;//表示菜单的dom
window.a_1_0_4_5_1_vue=null;//表示菜单的dom
window.a_1_0_4_5_1_show_menu=function(obj){

let x=null;
let y=null;
if(obj.event){
    x=obj.event.clientX;
    y=obj.event.clientY;
}else{
    x=obj.x;
    y=obj.y;
}
let deepcopy_data={"menu_dct":obj.menu_dct,'keys':Object.keys(obj.menu_dct).sort(),x:x,y:y}
//如果菜单不存在则创建一个菜单
if(!a_1_0_4_5_1_dom){
let new_dom=document.createElement('a_1_0_4_5_1_menu');
//设置dom属性 ref值为ref_obj
new_dom.setAttribute('ref','ref_obj');
new_dom.setAttribute(':deepcopy_data','deepcopy_data');
//设置vue
let vue_dct={'el':new_dom,data:{true:true,false:false,null:null,deepcopy_data:deepcopy_data}};
// 将这个 div 添加到 document.documentElement（即 <html> 元素）  
document.documentElement.appendChild(new_dom);
//渲染vue组件
window.a_1_0_4_5_1_vue=new Vue(vue_dct);
window.a_1_0_4_5_1_dom=new_dom;

document.addEventListener('click', function(event) {
  // Check if the clicked element is not doma and not a descendant of doma
  if (!window.a_1_0_4_5_1_vue.$refs.ref_obj.$el.contains(event.target)) {
      window.a_1_0_4_5_1_vue.$refs.ref_obj.show_flag=false;
  }
});
}else{
    window.a_1_0_4_5_1_vue.$refs.ref_obj.data.keys=Object.keys(obj.menu_dct).sort();
    window.a_1_0_4_5_1_vue.$refs.ref_obj.data.menu_dct=obj.menu_dct;
    window.a_1_0_4_5_1_vue.$refs.ref_obj.data.x=x;
    window.a_1_0_4_5_1_vue.$refs.ref_obj.data.y=y;
    window.a_1_0_4_5_1_vue.$refs.ref_obj.data.refresh();
    window.a_1_0_4_5_1_vue.$refs.ref_obj.show_flag=true;

}

}


Vue.component2('a_1_0_4_5_1_menu', {  
    template: `
       
        <div class="a_1_0_4_5_1_sub_menu" :style="lefttop" :key='refresh' v-show='show_flag'>
            <div class="a_1_0_4_5_1_sub_menu_item" ref="text"v-for="(key,indexr) in data.keys" @click="click($event,key)">
                {{data.menu_dct[key].text}}
            </div>
        </div>
`,
data(){
    return{
        show_flag:true,
        refresh:'1',
        lefttop:'color:red',
        data:{
            menu_dct:{
            },
            keys:{},
            x:'33',
            y:'33',
        }
    }
},
watch:{
    
    "data.x":function(e){
        this.lefttop=`left:${this.data.x};top:${this.data.y};`
    },
    "data.y":function(e){
        this.lefttop=`left:${this.data.x};top:${this.data.y};`
    },
},
methods:{
    
    click:function(event,key){
        this.data.menu_dct[key].click(event);
        this.show_flag=false;
    },
},

mounted:function(){
_this.data.refresh=function(){_this.refresh='2'?'1':'2'};
_this.data.keys=_this.deepcopy_data.keys;
_this.data.x=_this.deepcopy_data.x;
_this.data.y=_this.deepcopy_data.y;
_this.data.menu_dct=_this.deepcopy_data.menu_dct;_this.data.refresh();
}

})

// a_1_0_4_5_1_show_menu(
// {
//     menu_dct:{
//         '0':{
//             'text':"删除",
//             'click':function(){console.log("???");
//},
//         },
//         '1':{
//             'text':"查看",
//             'click':function(){console.log("2???");
//},
//         },
//     },
//     x:444,y:444,
// }
// )

// a_1_0_4_5_1_show_menu(
// {
//     menu_dct:{
//         '0':{
//             'text':"3删除",
//             'click':function(){console.log("???");
//},
//         },
//         '1':{
//             'text':"4查看",
//             'click':function(){console.log("2???");
//},
//         },
//     },
//     event:{clientX:333,clientY:555}
// }
// )
////----------------------绘制右击菜单-------end--------------/////////

//-------------------------绘制 组件按钮-------start--------------//
Vue.component2('a_1_0_4_5_1_buttonx', {  
    template: `
        <div  class="a_1_0_4_5_1_class6" :style="lefttop"
        v-if="data.id_"
        @mousedown="mouse_down2"
        @mouseup="mouse_up2"
        :key="refresh"
        >
            <div 
            
        :class="{
        'a_1_0_4_5_1_class1':data.true,
        
        'a_1_0_4_5_1_click_out_button':data.out_flag,
    'a_1_0_4_5_1_click_in_button': data.in_flag,
        }"
            
            >
        
        <span  style="color:#bcbcbc" :key="refresh2">{{data.father.page_dict[data.id_].name}}</span>



        
        <!-- 入参 上圆 -->
        <svg 
        入参
        class="a_1_0_4_5_1_class2"
        @mousedown="mouse_down__"
        @mouseup="mouse_up1" 
        :style="data.circle_style1"  width="12" height="12">
        <circle cx="6" cy="6" r="4" fill="none" stroke="#FFFFFF" style="" stroke-width="1"></circle></svg>
        
        <!-- 出参 下圆 -->
        <svg 
        出参
        class="a_1_0_4_5_1_class3"
        @mousedown="mouse_down1"
        :style="data.circle_style2" width="12" height="12">
        <circle cx="6" cy="6" r="4" fill="none" stroke="#FFFFFF" style="" stroke-width="1"
        
        ></circle></svg>
        
        <!-- 进程id-->
        <svg 
        进程id
        width="24" height="24"
        
        :class="{
        'a_1_0_4_5_1_class4':data.true,
        
        'a_1_0_4_5_1_success1':data.father.process_dct[data.father.page_dict[data.id_].process_id],
    'a_1_0_4_5_1_error1': !data.father.process_dct[data.father.page_dict[data.id_].process_id],
        }"
        
        :style="data.circle_style3">
        <circle cx="12" cy="12" r="8" fill="none" stroke="#FFFFFF" stroke-width="2"></circle>
    
    
        <text x="7" y="17" fill="white" style="font-size: 15px; font-family: Arial;">
{{data.father.page_dict[data.id_].process_id}}</text> </svg>
    
    <!-- 函数类型  显示tree_type的圈圈0(绿色)表示被动执行的函数(如 def a():return 1) 1(橙色)表示需要触发执行的函数(如接收http请求的函数)-->
    <svg 
    函数类型
    width="24" height="24"
    
    :class="{
        'a_1_0_4_5_1_class5':data.true, 
        'a_1_0_4_5_1_success2': data.father.page_dict[data.id_].tree_type=='0',
    'a_1_0_4_5_1_error2': data.father.page_dict[data.id_].tree_type=='1',
    }"
    
    :style="data.circle_style4">
    <circle cx="12" cy="12" r="8" fill="none" stroke="#FFFFFF" stroke-width="2"></circle>
    </svg>
        </div>



        </div>
`,
data(){
    return{
      refresh:'1',
      refresh2:'3',
        lefttop:'',
        data:{
          out_flag:false,
          in_flag:false,
            id_:null,
            father:{},
            true:true,
            process_dct2:{54:"mqtt进程"},
            process_dct:{45:"mqtt进程"},
            process_id:"",
            circle_style1:'',
            circle_style2:'',
            circle_style3:'',
            circle_style4:'',
            circle_style_left:'',
            name:"",
            key:'',
            x:'',
            y:'',
        }
    }
},
watch:{
    "data.x":function(e){
        this.lefttop=`left:${this.data.x};top:${this.data.y};`
    },
    "data.y":function(e){
        this.lefttop=`left:${this.data.x};top:${this.data.y};`
    },
    "data.name":function(e){
        let obj=a_1_0_4_5_1_get_wh({
            'context':this.data.father.page_dict[this.data.id_].name,
            'class':"a_1_0_4_5_1_class1 ddd"
        });
        let width=obj.width;
        this.data.circle_style1=`left:${width/2-6}px`;
        this.data.circle_style2=`left:${width/2-6}px`;
        this.data.circle_style_left=width/2-6;
    }
},

methods:{
  refresh2_func:function(){
    
    this.refresh2=this.refresh2==='4'?'3':'4'},
  refresh_func:function(){
    
    let obj=a_1_0_4_5_1_get_wh({
      'context':this.data.father.page_dict[this.data.id_].name,
      'class':"a_1_0_4_5_1_class1 ddd"
  });
  let width=obj.width;
  this.data.circle_style1=`left:${width/2-6}px`;
  this.data.circle_style2=`left:${width/2-6}px`;
  this.data.circle_style_left=width/2-6;
    this.refresh=this.refresh==='2'?'1':'2'},
  return_circle_xy1:function(){
    return {x:this.data.x+this.data.circle_style_left,y:this.data.y-12}
  },
  return_circle_xy2:function(){
    return {x:this.data.x+this.data.circle_style_left,y:this.data.y+24}
  },
  
     mouse_down__:function(event){
      event.stopPropagation();
     },
     mouse_up__:function(event){
      event.stopPropagation();
     },
    mouse_up1:function(event){
      let data=this.data.father_data.全局鼠标操作对象1.get_data({key:"绘制当前连线"})
        try{ if (!data.write_flag){return}}catch{return}
       
      let xy=this.return_circle_xy1();
        console.log("上圆 释放鼠标")
        this.data.father_data.建立连接线({
          key:this.data.key
        });
        event.stopPropagation();
    },
    mouse_down1:function(event){
      let xy=this.return_circle_xy2();
        this.data.father_data.全局鼠标操作对象1.set_data({
          key:"绘制当前连线",
          data:{key:this.data.key,
            x1:xy.x,y1:xy.y,
            write_flag:true
          }
      });
        this.data.father_data.显示当前绘制的连线(event);


        this.data.father_data.全局鼠标操作对象1.set_move({
          key:"绘制当前连线",
          key2:"绘制当前连线move",
          func:this.data.father_data.移动当前绘制的连线,
      });
      this.data.father_data.全局鼠标操作对象1.set_up({
          key:"绘制当前连线",
          key2:"绘制当前连线up",
          func:this.data.father_data.隐藏当前绘制的连线,
      });

        event.stopPropagation();
    },
    mouse_up2:function(event){
      if ( this.button_2_flag){
        if(this.button_2.x==event.clientX && this.button_2.y==event.clientY){
          this.click(event);
        }
      }
      else if(this.button_1_flag){
        if(this.button_1.x==event.clientX && this.button_1.y==event.clientY){
          this.data.father_data.选择组件(this.data.key);
        }
      }
  },
    move_mouse:function(){

    },
    
    mouse_down2:function(event){
      if (event.button === 2) {
        // 如果是右键，阻止进一步处理
        this.button_2={'x':event.clientX,'y':event.clientY}
        this.button_2_flag=true;
        this.button_1_flag=false;
        return;
    }
    this.button_2_flag=false;
    this.button_1_flag=true;
    this.button_1={'x':event.clientX,'y':event.clientY}
    this.button_2=null;
      this.data.father_data.全局鼠标操作对象1.set_move({
        key:"移动前端组件",
        key2:"移动前端组件move",
        func:this.data.father_data.移动前端组件move,
    });
    this.data.father_data.全局鼠标操作对象1.set_up({
        key:"移动前端组件",
        key2:"移动前端组件up",
        func:this.data.father_data.移动前端组件up,
    }); 
    this.data.father_data.全局鼠标操作对象1.set_data({
        key:"移动前端组件",
        data:{key:this.data.key,
          x:this.data.x,y:this.data.y,
          mousex:event.clientX,mousey:event.clientY}
    });
  },
  change_name:function(_this){
    this.$prompt('修改组件名称', '提示', {
      confirmButtonText: '确定',
      cancelButtonText: '取消',
    }).then(({ value }) => {
      
      _this.data.father_data.修改组件名称(_this.data.key,value);
    }).catch(() => {
      this.$message({
        type: 'info',
        message: '取消输入'
      });       
    });
  },
  click:function(event){
    let _this=this;
    a_1_0_4_5_1_show_menu({
      event:event,
      menu_dct:{
        
        0:{
          text:"改名",
          click:function(event){
            _this.change_name(_this);
          }
        },
        1:{
          text:"删除",
          click:function(event){
            _this.data.father_data.删除组件(_this.data.key);
          }
        }
      }
    })
  }
},

mounted:function(){

}

})
window.a_1_0_4_5_1_dom_dct={};
window.a_1_0_4_5_1_add=function(obj){
let father_dom=obj.father_dom||obj._this.$refs[obj.father_ref];
let vue_name=obj.vue_name;
//新建一个dom
let new_dom=document.createElement(vue_name);
//设置dom属性 ref值为ref_obj
new_dom.setAttribute('ref','ref_obj');
//设置vue
let vue_dct={'el':new_dom,data:{true:true,false:false,null:null}};
//设置vue传入参数
if(obj.deepcopy_data){new_dom.setAttribute(':deepcopy_data',"deepcopy_data");vue_dct.data.deepcopy_data=obj.deepcopy_data;}
//插入dom
father_dom.appendChild(new_dom);  
//渲染vue组件
let new_vue=new Vue(vue_dct);
//获取到刚才渲染的vue对象
let new_vue2=new_vue.$refs.ref_obj;
//加入快速访问中
if(obj.key){window.a_1_0_4_5_1_dom_dct[obj.key]={'dom':new_dom,"vue":new_vue2,'father_dom':father_dom}}

}
window.a_1_0_4_5_1_refresh_all=function(){
  for(let k in window.a_1_0_4_5_1_dom_dct){
    window.a_1_0_4_5_1_dom_dct[k].vue.refresh_func();
  }
}
window.a_1_0_4_5_1_del=function(key){
window.a_1_0_4_5_1_dom_dct[key].father_dom.removeChild(window.a_1_0_4_5_1_dom_dct[key].vue.$el);
delete window.a_1_0_4_5_1_dom_dct[key];
}
window.a_1_0_4_5_1_clear=function(){
  window.a_1_0_4_5_1_dom_dct={};
}

//----------------绘制连接线的函数end---------------//
Vue.component2('a_1_0_4_5_1_input_range',{
  template:`
  <div 
      @mouseenter="handleMouseEnter"  
      @mouseleave="handleMouseLeave">


  <input ref="range"class="a_1_0_4_5_1inputrange"type="range" min="1" max="200" step="1" value="100" @input="showValue">


        <div class="a_1_0_4_5_1_sub_menu" :style="hovertext_style">
            <div class="a_1_0_4_5_1_sub_menu_item" ref="text">
               缩放比:100%
            </div>
        </div>


  </div>
  `, 
  data() {
      return {
        refresh:"1",
        show_flag:true,
        hover_flag:false,
        style:{},
        hovertext_style:"top:-100;visibility:hidden;",
        style2:"",
        data:{
            test:false,
            val:100,
            add_show:true,
            callback:null,
            icon_class:"",//图标类
            icon_color:"rgba(231, 231, 231, 0.6)",//图标颜色
            background:"#212121",//背景颜色
            hovercolor:"#ffffff",//高亮颜色
            hovertext:"缩放比:100%",//移动到位后的提示文字
            click:null,//点击触发函数
        }
      };
  },
  watch:{
  },
  methods:{accumulateParentOffsets:function (targetElement) {  
    let currentElement = targetElement;  
    let totalLeft = 0;  
    let totalTop = 0;  
  
    while (currentElement && currentElement.nodeType === Node.ELEMENT_NODE) {  
        const computedStyle = window.getComputedStyle(currentElement);  
          
        if (computedStyle.position === 'relative') {  
            // 注意：offsetLeft 和 offsetTop 给出的是相对于最近的定位祖先的偏移  
            // 在这里，我们假设没有其他的定位祖先（或它们不影响我们的计算）  
            // 因为我们只关心 relative 定位的父元素  
            totalLeft += currentElement.offsetLeft;  
            totalTop += currentElement.offsetTop;  
        }  
  
        currentElement = currentElement.parentElement;  
    }  
  
    return { left: totalLeft, top: totalTop };  
} ,
    showValue(event){
      this.data.val=event.target.value;
      this.$refs.text.innerHTML="缩放比:"+this.data.val+'%';
      try{this.data.callback(this.data.val)}catch{};
    },
    get_rect(){
      let rect=this.$refs.range.getBoundingClientRect();

  // console.log('Top:', rect.top);
  // console.log('Left:', rect.left);
  // console.log('Bottom:', rect.bottom);
  // console.log('Right:', rect.right);
  // console.log('Width:', rect.width);
  // console.log('Height:', rect.height);
  return rect
    },
    handleMouseEnter(){  
        if(this.hover_flag==false){
            this.hover_flag=true; 
            let rect=this.get_rect();
            let oobj=this.accumulateParentOffsets(this.$refs.range);
            this.hovertext_style=`top:${rect.top-oobj.top-40};left:${rect.left-oobj.left}`;
        }
      },  
      handleMouseLeave() {  
        if(this.hover_flag==true){
            this.hover_flag=false; 
            this.hovertext_style="top:-100;visibility:hidden;";
        }
      } ,
  },
  mounted:function(){
} }
);

//-------------------------绘制 组件按钮-------end--------------//
////如果处于组件拖拽进来的状态
//创建连线
//组件被点击
Vue.component2('a_1_0_4_5_1', {  
    template: `
<div class="a_1_0_4_5_1_parent1" v-show="data.show_flag ">

  <!-- 顶部显示窗口 start -->
    <div class="a_1_0_4_5_1_title" ref="title">
        <div style="padding-left:20px;color:#bcbcbc">前端可视化编辑界面
            <div style="display:inline-block;flex:1;">
                <div style="display:flex;
                    justify-content: flex-end;
                    display: flex;">
                </div>
            </div>
        </div>
    </div>
  <!-- 顶部显示窗口 end -->


<!-- 弹窗部分 end -->
  <!-- 主要操作窗口 start -->
  <div ref="scroll"class="a_1_0_4_5_1_parent a_1_0_4_5_1scrollbar"style="position: relative;
    background: #282828;"
   
    >
    <div :style="data.write_style"
    class="a_1_0_4_5_1_parent3"
    ref="write_dom"
    @mousemove="mousemove_"  
    @mouseup="mouseup_" 
    @mouseleave="mouseleave_" 
    @mouseenter="mouseenter_"
    @mousedown="mousedown_"
    >
    </div>
    </div>

  <!-- 主要操作窗口 end -->
  
  <!-- 底部设置窗口 start -->
    <div class="a_1_0_4_5_1_shu_page_info" ref="end">
    <!-- 设置界面缩放比 start -->
    <a_1_0_4_5_1_input_range  :key="data.scale_key"style="padding:7.5px" :deepcopy_data="data.change_scale_info"></a_1_0_4_5_1_input_range>
    <!-- 设置界面缩放比 end -->

    <!-- 设置界面宽度 start -->
    <a_1_0_4_5_1button  :key="data.width_key" style="padding:7.5px":deepcopy_data="data.change_width_info"></a_1_0_4_5_1button>
    <!-- 设置界面宽度 end -->

    <!-- 设置界面高度 start -->
    <a_1_0_4_5_1button  :key="data.height_key"style="padding:7.5px" :deepcopy_data="data.change_height_info"></a_1_0_4_5_1button>
    <!-- 设置界面高度 end -->

        </div>
    </div>
  <!-- 底部设置窗口 end -->

    </div>
  `,  
  data:function(){  
  
    return {
      page_type_key:"ff1",
      page_type:'未运行',
      now_select_temp_menu_flag:false,
      now_select_line_menu_flag:false,
        data:{
          write_style:"width:1920px;height:1080px;scale:0.5",
          scale:1.0,
          scale_key:"1",
          change_scale_info:{},
          change_width_info:{},
          change_height_info:{},
          width:'1920px',
          width_key:"3",
          height:'1080px',
          height_key:"5",

          key:null,//当前选择的页面
          data:{},
          全局配置对象:null,
          true:true,
          false:false,
          show_flag:false,
          },
        }
    }   , 
    watch:{

    },
  methods: {  
  拖拽进来组件:function(event,info){
    this.data.新增组件(event,info);
    
  },
  //鼠标释放 触发函数
  mouseup_:async function(event,){
    let _this=this;
    event.stopPropagation();
    console.log("释放dom1")
    // await time_sleep(5000);
    console.log("_this.data.全局鼠标操作对象1 eeee",JSON.parse(JSON.stringify(this.data.全局鼠标操作对象1.up_funcs)))
    if (this.data.全局鼠标操作对象1.up_funcs['拖拽前端组件']){
      this.拖拽进来组件(event,this.data.全局鼠标操作对象1.get_data({"key":'拖拽前端组件'}));
      
      this.data.全局鼠标操作对象1.unset_move({"key":"拖拽前端组件",
        key2:"鼠标移动时移动dom2",});
    this.data.全局鼠标操作对象1.unset_up({"key":"拖拽前端组件",
        key2:"鼠标up时回收dom",});
        this.data.全局鼠标操作对象1.set_data({
            key:"拖拽前端组件_move_flag",
            data:{"flag":false}
        });
        a_1_0_2_25_1_move_obj.$el.style.visibility='hidden';
        this.data.删除容器插入位();
    }else if(_this.left_button_flag){
      if((Math.abs(event.clientX==_this.left_button_xy.x)<8)&&(Math.abs(event.clientY==_this.left_button_xy.y)<8)){
        //鼠标左键按下
        _this.data.设置move描边(event);
        if(_this.old_move_dom_id!='-1'){
          _this.data.选择组件(_this.old_move_dom_id);
        }
      }
    }else if(_this.right_button_flag){
      if((Math.abs(event.clientX==_this.right_button_xy.x)<8)&&(Math.abs(event.clientY==_this.right_button_xy.y)<8)){
        //鼠标右键按下
        _this.data.设置move描边(event);
        if(_this.old_move_dom_id!='-1'){
          _this.data.弹出组件右击窗口(event);
        }
      }
    }
    
    console.log("释放dom1 end")
    let x=event.clientX;
    let y=event.clientY;
    let relative_leftright=accumulateParentOffsets(this.$refs.write_dom);//累加所有relative 父dom的left和top
    let params={x:x,y:y,relative_leftright:relative_leftright,dom:this.$refs.write_dom};
    try{this.data.move_obj.mouseup(event,params);}catch{}
    
  },

  //鼠标按下
  mousedown_:async function(event,){
    let _this=this;
    //鼠标左击按下
    if(event.button===0){
      _this.left_button_flag=true;
      _this.right_button_flag=false;
    _this.left_button_xy={x:event.clientX,y:event.clientY};
    //鼠标右击按下
    }else if(event.button===2){
      _this.right_button_flag=true;
      _this.left_button_flag=false;
      _this.right_button_xy={x:event.clientX,y:event.clientY};
    }
  },
  //鼠标移动 触发函数
  mousemove_:function(event){
    let x=event.clientX;
    let y=event.clientY;
    let relative_leftright=accumulateParentOffsets(this.$refs.write_dom);//累加所有relative 父dom的left和top
    let params={x:x,y:y,relative_leftright:relative_leftright,dom:this.$refs.write_dom};
    try{this.data.move_obj.mousemove(event,params);}catch{}

    let flag_data=this.data.全局鼠标操作对象1.get_data({
      key:"拖拽前端组件_move_flag",
  });
  let 拖拽前端_flag=false;
  try{if(flag_data.flag){拖拽前端_flag=true}}catch{}

  if(拖拽前端_flag){
    // console.log("设置容器描边")
    try{this.data.设置容器描边(event);}catch (err){console.log("err",err);
}
    
  }else{
    try{this.data.设置move描边(event);}catch{}
  }
  
  },
  //鼠标移入 触发函数
  mouseenter_:function(event,){
    let x=event.clientX;
    let y=event.clientY;
    let relative_leftright=accumulateParentOffsets(this.$refs.write_dom);//累加所有relative 父dom的left和top
    let params={x:x,y:y,relative_leftright:relative_leftright,dom:this.$refs.write_dom};
    try{this.data.move_obj.mouseenter(event,params);}catch{}
  },
  //鼠标离开 触发函数
  mouseleave_:function(event,){
    let x=event.clientX;
    let y=event.clientY;
    let relative_leftright=accumulateParentOffsets(this.$refs.write_dom);//累加所有relative 父dom的left和top
    let params={x:x,y:y,relative_leftright:relative_leftright,dom:this.$refs.write_dom};
    try{this.data.move_obj.mouseleave(event,params);}catch{}
    
  this.data.删除move描边(event);

  },
    run_page:function(){
      let body_data=JSON.parse(JSON.stringify(this.url_params))
      body_data['page_id']=this.now_select
      try{
        if (this.base_info['run_flag']==true){
        body_data['type']="stop_page"
        }else{
        body_data['type']="run_page"
        }
      }
      catch{
        body_data['type']="run_page"
      }
      this.project_post({body_data:body_data})
    },
    show_tip:function(a,b,c,d,e){
       show_tip(a,b,c,d,e)
    },
    _refresh:function(){
      //更新入参界面小三角数据
      try{
        this.base_info=this.data.page_config.dict[this.now_select].page_chat_base_info
        this.page_dict=this.data.page_config.dict[this.now_select].page_chat_use_compontent
        try{
          if (this.base_info['run_flag']==true){
          this.page_type='运行中'
          }else{
          this.page_type='未运行'
          }
        }
        catch{
          this.page_type='未运行'
        }
        
        //快速访问获取到进程名称
        this.process_dct=this.base_info.process_dct
        
        this.process_dct2={}
        for (let kkk in this.process_dct){this.process_dct2[kkk]=kkk}

        this.process_dct2['null']=''
        this.process_dct2['undefined']=''
        //刷新页面
        if (this.refresh.length>10){this.refresh="1"}else{this.refresh=this.refresh+"1"}
        
      }catch{}

    },
    handleGlobalClick(event){
      if (this.now_select_line_menu_flag==true){
        this.now_select_line_menu_flag=false
      }
      if (this.now_select_temp_menu_flag==true){
        this.now_select_temp_menu_flag=false
      }
    },
    check_select:function(){
       
      if (this.now_select==null)
      {return "position: relative;"}
      else if(!this.data.page_config.dict.hasOwnProperty(this.now_select)){
        return "display:none;position: relative;"
      }
      return "position: relative;"
    }, 
    check_select2:function(){
      if (this.now_select==null)
      {return "display:none;position: relative;"}
      else if(!this.data.page_config.dict.hasOwnProperty(this.now_select)){
        return "position: relative;"
      }
      return "display:none;position: relative;"
    },
    
    svg_down(event,params={}){
      let rect = this.$refs.scroll.getBoundingClientRect();
      this.write_line_now_obj={
        x:event.clientX-rect.left-25,
        y:event.clientY-rect.top,
        name:''
      }
      this.连线_clientX=event.clientX;
      this.连线_clientY=event.clientY;
      this.连线_startx=this.write_line_now_obj.x;
      this.连线_starty=this.write_line_now_obj.y;
      this.write_line_start_key=params.key;
      this.write_line_flag=true;
    },
    //检测输出组件与输入组件是否存在连线
    check_line(out_id,in_id){
      
      let start_obj=this.page_dict[in_id]
      let start_obj_in_kwargs=start_obj.in_kwargs;
      for (let kk in start_obj_in_kwargs){
        if (start_obj_in_kwargs[kk].in_params && start_obj_in_kwargs[kk].in_params[0]==out_id){
          return {"type":true,'data':start_obj_in_kwargs[kk].in_params[2]}
        }
      }
      return {"type":false}
    },
    //在已有连线的组件上进行连线
    add_line_params(out_id,in_id,check_line_res,out_params_info){
let _this=this;
      let key1=out_params_info.key1//出参组件的 出参 id
      let key2=out_params_info.key2//入参组件的 入参 id
      //1.更新 入参组件的 入参连线index计数
      //2.更新 入参组件的 入参连线 的数据
      let in_kwargs_data={}
      in_kwargs_data[key2]={"in_params":{},"in_type1":"1",'v1_':[out_id,key1]}
                      //--------输出的key和value
      in_kwargs_data[key2]['in_params']=[out_id,key1,check_line_res.data]
      //4.更新 出参组件的 出参连线index计数
      //5.更新 出参组件的 出参连线 的数据
      let out_kwargs_data={}
      out_kwargs_data[key1]={"out_params":{}}
                      //--------输出的key和value
      out_kwargs_data[key1]['out_params'][in_id]={}
      out_kwargs_data[key1]['out_params'][in_id][key2]={"key":check_line_res.data}
//更新数据 
let update_val={
  "type":"change_data",
  "data_type":"set_list",//类型 修改数据
  update_params:[
    {
      name:"检查目标元素是否存在 存在则不执行该操作",
      path:`page_config.dict.1.dict.${this.now_select}.page_dict.${in_id}.in_kwargs.${key2}.in_params`,
      message:"已经拥有此传参了",
      use:"check_true"
    }
  ],
  "postput":[
    {
      'path':`page_config.dict.1.dict.${this.now_select}.page_dict.${out_id}.out_kwargs`,
      'data':out_kwargs_data
    },
    //更新
    {
      'path':`page_config.dict.1.dict.${this.now_select}.page_dict.${in_id}.in_kwargs`,
      'data':in_kwargs_data
    },
  ],
}
_this.data.全局配置对象.更新(update_val);
    },
    handleMouseDown(event, params = {}) {  
      if (event.button === 2) {
        // 如果是右键，阻止进一步处理
        return;
    }
      console.log('Mouse down, but ignoring params:', event);  
      this.拖动_clientX=event.clientX;
      this.拖动_clientY=event.clientY;
      let oojb=this.page_dict[params.key];
      this.拖动_startx=oojb.x;
      this.拖动_starty=oojb.y;
      this.拖动_key=params.key;
      this.拖动_flag=true;
      console.log('旧坐标:',this.拖动_startx,this.拖动_starty)
      // 这里默认不处理传入的params，因为它不是从事件直接传入的  
      // 你可以在其他地方调用这个函数时传入params  
      // 你可能想在这里做一些初始化工作，比如设置一个标志位  
    },  

handleMouseLeave(event){
  // this.movein_flag=false;
},
    handleMouseMove(event) {  
      // this.movein_flag=true
      // if (this.拖动_flag == true){
      //   let oojb=this.page_dict[this.拖动_key];
      //   oojb.x=this.拖动_startx+event.clientX-this.拖动_clientX;
      //   oojb.y=this.拖动_starty+event.clientY-this.拖动_clientY;
      // }else if(this.write_line_flag==true){

      //   this.write_line_now_obj.x=this.连线_startx+event.clientX-this.连线_clientX;
      //   this.write_line_now_obj.y=this.连线_starty+event.clientY-this.连线_clientY;
      // }
    },  
  
    handleMouseUp(event) {  
    }  ,
    check_type:function(){
      if (typeof this.$el.querySelector === 'function') {  
        return true
    } else { return false }
    },
    //id不存在则返回true
    check_p:function(process_id){return process_id==null ||(!(this.process_dct[process_id]))},

    //当组件间进行参数传递时  建立相应的进程关系
    process_add_lst:function(use_compontent,lst,temp_id,put_process_id,put_lst){
      //process_from={1:{'1':{}}}
      //process_from_fast={1:{'from_key':1,fast:{1:true,2:true,3:true}}}
      let now_info=use_compontent[temp_id]
      put_lst=JSON.parse(JSON.stringify({"a":put_lst}))['a']
      let put_dct={};
      // console.log(put_lst)
      for (let k=0;k<put_lst.length;k++){
        put_dct[put_lst[k]]=true
      }
    // console.log('put_lst,put_dct',put_lst,put_dct)
      // let process_id=now_info.process_id
      let check_id=null
    // console.log("add_lst_flag",this.check_p(process_id)==check_p_flag)
      // if (this.check_p(put_process_id)==check_p_flag){
        let in_ids=null;
        let in_kwargs=now_info.in_kwargs,out_kwargs=now_info.out_kwargs;
        for(let i in in_kwargs){
          try{
          check_id=in_kwargs[i].in_params[0];
          //如果目标id不在目标字典中  那么将process_id传入
          if (!(check_id in put_dct)){
              lst.push([put_process_id,temp_id,check_id,put_lst])
          }
        }catch{}
        }
        for(let i in out_kwargs){
          try{
          in_ids=Object.keys(out_kwargs[i].out_params)
          for (let j in in_ids){
            
            check_id=in_ids[j];
            //如果目标id不在目标字典中  那么将process_id传入
            if (!(check_id in put_dct)){
                lst.push([put_process_id,temp_id,check_id,put_lst])
            }

            }}catch{}
        }
      // }
    },
    set_process_from:function(输出组件_id,输入组件_id){
       let use_compontent=JSON.parse(JSON.stringify(this.page_dict));
       let 输出组件_进程id=use_compontent[输出组件_id].process_id;
       let 输入组件_进程id=use_compontent[输入组件_id].process_id;
       console.log("输出组件_进程id",输出组件_进程id)
       let lst=[];//待处理队列
       let post_dct={};//要进行post的对象
       if (!this.check_p(输出组件_进程id)){
        console.log("输出拥有进程id:",!this.check_p(输出组件_进程id))
        lst.push(
          {
            输出组件_进程id:输出组件_进程id,
            输出组件_id:输出组件_id,
            输入组件_id:输入组件_id,
            进程路径:this.get_process_lst_by_process_id(输出组件_id,输出组件_进程id)
          }
        )
       }
       if (!this.check_p(输入组件_进程id)){
        // console.log("inininini",in_id,输入组件_进程id)
       console.log("输入拥有进程id:",this.check_p(输出组件_进程id))
        lst.push(
          {
            输出组件_进程id:输入组件_进程id,
            输出组件_id:输入组件_id,
            输入组件_id:输出组件_id,
            进程路径:this.get_process_lst_by_process_id(输入组件_id,输入组件_进程id)
          })
       }
       let 临时记录组件当前进程id={};
       let 当前处理项=null,新路径=null,当前处理项数据=null;
       while (lst.length){
        当前处理项=lst.pop();//取出当前处理项
        //如果输入组件已拥有进程id 则跳过
        当前处理项数据=this.page_dict[当前处理项.输入组件_id];
        if(!this.check_p(当前处理项数据.process_id) || (临时记录组件当前进程id[当前处理项.输入组件_id])){continue}
        //存入临时记录表 避免重复添加
        临时记录组件当前进程id[当前处理项.输入组件_id]=true;
        //更新路径
        新路径=JSON.parse(JSON.stringify({'a':当前处理项.进程路径}))['a'];
        新路径.push(当前处理项.输入组件_id);
        //写入数据
        post_dct[当前处理项.输入组件_id]={
          process_id:当前处理项.输出组件_进程id,
          process_from:{}
        }
        post_dct[当前处理项.输入组件_id].process_from[当前处理项.输出组件_进程id]=新路径;
        //遍历出参和入参 将组件加入待处理列表
        let in_kwargs=当前处理项数据.in_kwargs,out_kwargs=当前处理项数据.out_kwargs;
        for(let i in in_kwargs){
          try{
          check_id=in_kwargs[i].in_params[0];
          //如果目标id不在目标字典中  那么将process_id传入
          lst.push(
            {
              输出组件_进程id:当前处理项.输出组件_进程id,
              输出组件_id:当前处理项.输入组件_id,
              输入组件_id:check_id,
              进程路径:新路径
            })
        }catch{}
        }
        for(let i in out_kwargs){
          try{
          in_ids=Object.keys(out_kwargs[i].out_params)
          for (let j in in_ids){
            
            check_id=in_ids[j];
            //如果目标id不在目标字典中  那么将process_id传入
            lst.push(
              {
                输出组件_进程id:当前处理项.输出组件_进程id,
                输出组件_id:当前处理项.输入组件_id,
                输入组件_id:check_id,
                进程路径:新路径
              })

            }}catch{}
        }}

       return post_dct
      },
    //当删除组件 或者删除连线时 删除相应的进程关系
    process_add_lst2:function(lst,temp_id,put_process_id,put_lst=null,check_id=null){
      // console.log("lst:",lst)
      // console.log("temp_id:",temp_id)
      // console.log("put_process_id:",put_process_id)
      // console.log("put_lst:",put_lst)
      // console.log("check_id:",check_id)
        //process_from={1:{'1':{}}}
        //process_from_fast={1:{'from_key':1,fast:{1:true,2:true,3:true}}}
        let now_info=this.page_dict[temp_id]
        // let process_id=now_info.process_id
      // console.log("add_lst_flag",this.check_p(process_id)==check_p_flag)
        // if (this.check_p(put_process_id)==check_p_flag){
          let in_ids=null,del_lst=null,new_lst=null;
          let in_kwargs=now_info.in_kwargs,out_kwargs=now_info.out_kwargs,add_llst=[];
          if (check_id!=null){
        // console.log("temp->check_id",temp_id,check_id,this.page_dict[check_id].process_from[put_process_id])
            try{
              del_lst=this.page_dict[check_id].process_from[put_process_id][temp_id];
              // console.log("del_lst",del_lst)
              if (!del_lst){return}
              // console.log(`del_lst ${check_id}(check_id) ${put_process_id}(process_id)`,this.page_dict[check_id],put_process_id,del_lst)
              lst.push([put_process_id,temp_id,check_id,del_lst])
            }catch{}
            return
          }
      ///////////////////////
          for(let i in in_kwargs){
            try{
  add_llst.push(in_kwargs[i].in_params[0])}catch{}}
      for(let i in out_kwargs){
            try{
            in_ids=Object.keys(out_kwargs[i].out_params)
            for (let j in in_ids){
  add_llst.push(in_ids[j])
            }}catch{}}
  
  if(put_lst==null&&check_id==null){
      
  for(let ii=0;ii<add_llst.length;ii++){
      // console.log("check",add_llst[ii],this.page_dict[add_llst[ii]].process_from[put_process_id][temp_id])
      check_id=add_llst[ii]
      del_lst=this.page_dict[check_id].process_from[put_process_id][temp_id]
      try{del_lst=this.page_dict[check_id].process_from[put_process_id][temp_id]}catch{continue}
      if(!del_lst){continue}
      new_lst=JSON.parse(JSON.stringify({"a":del_lst}))["a"];
      new_lst.pop();
        lst.push([put_process_id,temp_id,check_id,del_lst])
      
  }
         return 
      }
  let put_lst_str=put_lst.join("_")
  //let test_str=''
  for(let ii=0;ii<add_llst.length;ii++){
      // console.log("check",add_llst[ii],this.page_dict[add_llst[ii]].process_from[put_process_id][temp_id])
      check_id=add_llst[ii]
      try{del_lst=this.page_dict[check_id].process_from[put_process_id][temp_id]}catch{continue}
      if(!del_lst){continue}
      new_lst=JSON.parse(JSON.stringify({"a":del_lst}))["a"];
      new_lst.pop();
      if (new_lst.join("_")==put_lst_str){
          //test_str=test_str+check_id+' '
        lst.push([put_process_id,temp_id,check_id,del_lst])
      }
  }
      
      //if(!test_str){console.log(`${temp_id}=>${check_id}`,test_str)}
      },
    //
    del_process_from__x2:function(obj){
      if(!obj.临时_process_dct[obj.组件id]){
        let process_from=obj.process_from || this.page_dict[obj.组件id].process_from || {};
        for(let 进程id in process_from){
          obj.临时_process_dct[进程id]=process_from[进程id].join('_')
        }
      }
      return obj.临时_process_dct[obj.组件id]
    },
    del_process_from__x:function(obj){
      let lst=[];
      if(obj.flag=='删除组件'){
        let 输出组件数据=this.page_dict[obj.输出组件_id];
        let process_from=输出组件数据.process_from||{};
        for(let k in process_from){
          lst.push(
            {
              组件id:obj.输出组件_id,
              路径:process_from[k],
              进程id:k
            }
          )
        }
      }
      else if(obj.flag=='删除连线'){
        let 输出组件数据=this.page_dict[obj.输出组件_id];
        let 输入组件数据=this.page_dict[obj.输入组件_id];
        let process_dct1=输出组件数据.process_from||{};
        let process_dct2=输入组件数据.process_from||{};
        //判断输入组件 路径是否由输出组件 路径传入
        for(let k in process_dct1){
          if(process_dct2[k].join("_")==(process_dct1[k].join("_")+'_'+obj.输入组件_id)){
            lst.push({
              组件id:obj.输入组件_id,
              路径:process_dct2[k],
              进程id:k
            }
            )
          }
        }
        //判断输出组件 路径是否由输入组件 路径传入
        for(let k in process_dct2){
          if(process_dct1[k].join("_")==(process_dct2[k].join("_")+'_'+obj.输出组件_id)){
            lst.push({
              组件id:obj.输出组件_id,
              路径:process_dct1[k],
              进程id:k
            }
            )
          }
        }
      }else if(obj.flag=='删除指定路径'){
        let 路径=obj.路径;
        let 进程id=obj.进程id;
        let 组件id=obj.组件id;
        let 组件数据=this.page_dict[组件id];
        let in_kwargs=组件数据.in_kwargs;
        let out_kwargs=组件数据.out_kwargs;
        for(let i in in_kwargs){
          try{
            check_id=in_kwargs[i].in_params[0];
            if ((this.page_dict[check_id].process_from[进程id]||['#']).join("_")==(路径.join("_")+'_'+check_id)){
              lst.push({
                组件id:check_id,
                路径:this.page_dict[check_id].process_from[进程id],
                进程id:进程id
              })
            }
        }catch{}
        }
        
      for(let i in out_kwargs){
        try{
        in_ids=Object.keys(out_kwargs[i].out_params)
        for (let j in in_ids){
          check_id=in_ids[j];
          if ((this.page_dict[check_id].process_from[进程id]||['#']).join("_")==(路径.join("_")+'_'+check_id)){
            lst.push({
              组件id:check_id,
              路径:this.page_dict[check_id].process_from[进程id],
              进程id:进程id
            })
          }
        }}catch{}}}
      return lst
    },
    del_process_from_get_process_id:function(obj){
      let add_new_prcess=obj.add_new_prcess;
      let del_路径_dct=obj.del_路径_dct;
      let del_line=obj.del_line;
      let del_id=obj.del_id;
      let 组件id=obj.组件id;
      // console.log("组件id为",组件id,'开始获取新id')
      // console.log("为删除processid的添加新的进程id",JSON.parse(JSON.stringify(obj)));
      // console.log("为删除processid的添加新的进程id #1")
      let 组件数据=this.page_dict[组件id];
      // console.log("为删除processid的添加新的进程id #2")
      let in_kwargs=组件数据.in_kwargs;
      // console.log("为删除processid的添加新的进程id #3")
      let out_kwargs=组件数据.out_kwargs;
      // console.log("为删除processid的添加新的进程id #4")
      let check_id=null;
      // console.log("为删除processid的添加新的进程id #5",in_kwargs,out_kwargs)
      //遍历入参和出参 获取到新的process_id
      for(let i in in_kwargs){
        try{
          check_id=in_kwargs[i].in_params[0];
          if (check_id==del_id){continue}
          if(del_line && del_line[0]==check_id && del_line[1]==组件id){continue}
          let check_process_from=this.page_dict[check_id].process_from||{};
          let del_lst=del_路径_dct[check_id];
          
      // console.log("为删除processid的添加新的进程id #6",JSON.parse(JSON.stringify(check_process_from)))
          let add_new=add_new_prcess[check_id];
          // console.log("add_new_prcess",add_new_prcess)
          //如果目标组件id拥有新的进程id 那么直接设置
          if(add_new){
            for(let check_process_id in add_new){
              let res={};
              // console.log("为删除processid的添加新的进程id #8")
              res[组件id]={process_id:check_process_id,process_from:{}};
              // console.log("为删除processid的添加新的进程id #9")
              let new_lst=JSON.parse(JSON.stringify(add_new[check_process_id]));
              // console.log("为删除processid的添加新的进程id #10")
              new_lst.push(组件id);
              // console.log("为删除processid的添加新的进程id #11")
              res[组件id].process_from[check_process_id]=new_lst;
              // console.log("为删除processid的添加新的进程id #12",new_lst)
              return res

            }
          }
          for(let check_process_id in check_process_from){
            if(del_lst){
              //来源没有被删除
              if (!del_lst.includes(check_process_id)){
                // console.log("为删除processid的添加新的进程id #7")
                let res={};
                // console.log("为删除processid的添加新的进程id #8")
                res[组件id]={process_id:check_process_id,process_from:{}};
                // console.log("为删除processid的添加新的进程id #9")
                let new_lst=JSON.parse(JSON.stringify(check_process_from[check_process_id]));
                // console.log("为删除processid的添加新的进程id #10")
                new_lst.push(组件id);
                // console.log("为删除processid的添加新的进程id #11")
                res[组件id].process_from[check_process_id]=new_lst;
                // console.log("为删除processid的添加新的进程id #12",new_lst)
                return res
              }
            }else{
              // console.log("为删除processid的添加新的进程id #7")
              let res={};
              // console.log("为删除processid的添加新的进程id #8")
              res[组件id]={process_id:check_process_id,process_from:{}};
              // console.log("为删除processid的添加新的进程id #9")
              let new_lst=JSON.parse(JSON.stringify(check_process_from[check_process_id]));
              // console.log("为删除processid的添加新的进程id #10")
              new_lst.push(组件id);
              // console.log("为删除processid的添加新的进程id #11")
              res[组件id].process_from[check_process_id]=new_lst;
              // console.log("为删除processid的添加新的进程id #12",new_lst)
              return res
            }
          }
      }catch{}
      }
      
    for(let i in out_kwargs){
      try{
      in_ids=Object.keys(out_kwargs[i].out_params)
      for (let j in in_ids){
        check_id=in_ids[j];
        
        // console.log("为删除processid的添加新的进程id #7-1 check_id",check_id)
        if (check_id==del_id){continue}
        if(del_line && del_line[0]==组件id && del_line[1]==check_id){continue}
        // console.log("为删除processid的添加新的进程id #7-2 check_id",check_id)
        let check_process_from=this.page_dict[check_id].process_from||{};
        let del_lst=del_路径_dct[check_id];
        
        // console.log("为删除processid的添加新的进程id #7-3 check_id",check_process_from)
        let add_new=add_new_prcess[check_id];
        // console.log("add_new_prcess",add_new_prcess)
        //如果目标组件id拥有新的进程id 那么直接设置
        if(add_new){
          for(let check_process_id in add_new){
            let res={};
            // console.log("为删除processid的添加新的进程id #8")
            res[组件id]={process_id:check_process_id,process_from:{}};
            // console.log("为删除processid的添加新的进程id #9")
            let new_lst=JSON.parse(JSON.stringify(add_new[check_process_id]));
            // console.log("为删除processid的添加新的进程id #10")
            new_lst.push(组件id);
            // console.log("为删除processid的添加新的进程id #11")
            res[组件id].process_from[check_process_id]=new_lst;
            // console.log("为删除processid的添加新的进程id #12",new_lst)
            return res

          }
        }
        for(let check_process_id in check_process_from){
          if(del_lst){
            //来源没有被删除
            if (!del_lst.includes(check_process_id)){
              // console.log("为删除processid的添加新的进程id #7")
              let res={};
              // console.log("为删除processid的添加新的进程id #8")
              res[组件id]={process_id:check_process_id,process_from:{}};
              // console.log("为删除processid的添加新的进程id #9")
              let new_lst=JSON.parse(JSON.stringify(check_process_from[check_process_id]));
              // console.log("为删除processid的添加新的进程id #10")
              new_lst.push(组件id);
              // console.log("为删除processid的添加新的进程id #11")
              res[组件id].process_from[check_process_id]=new_lst;
              // console.log("为删除processid的添加新的进程id #12",new_lst)
              return res
            }
          }else{
            // console.log("为删除processid的添加新的进程id #7")
            let res={};
            // console.log("为删除processid的添加新的进程id #8")
            res[组件id]={process_id:check_process_id,process_from:{}};
            // console.log("为删除processid的添加新的进程id #9")
            let new_lst=JSON.parse(JSON.stringify(check_process_from[check_process_id]));
            // console.log("为删除processid的添加新的进程id #10")
            new_lst.push(组件id);
            // console.log("为删除processid的添加新的进程id #11")
            res[组件id].process_from[check_process_id]=new_lst;
            // console.log("为删除processid的添加新的进程id #12",new_lst)
            return res
          }
        }
      
      }}catch{}}


    },
    del_process_from:function(obj){
      let 输出组件_id=obj.out_id;
      let 输入组件_id=obj.in_id;
      let del_id=obj.del_id;
      let del_line=null;
      let 待处理列表=[];
      let del_temp_dct={};//存放删掉进程的组件id {组件id:true}
      let del_路径_dct={};//存放删掉的路径  {组件id:[进程id]}
        let res={
          delete_lst:[],
          postput:{}
        };
        if(!输入组件_id){
          待处理列表=this.del_process_from__x({
            flag:"删除组件",
            输出组件_id:输出组件_id
          });
          // console.log("要删除的进程#########初始化0:","删除组件",JSON.parse(JSON.stringify(待处理列表)))
        }else{
          del_line=[输出组件_id,输入组件_id];

          待处理列表=this.del_process_from__x({
            flag:"删除连线",
            输出组件_id:输出组件_id,
            输入组件_id:输入组件_id
          });
          
          // console.log("要删除的进程#########初始化0:","删除连线",JSON.parse(JSON.stringify(待处理列表)))
        }
        while (待处理列表.length){
          let obj=待处理列表.pop();
          // res.delete_lst.push(obj.组件id+'.process_from.'+obj.进程id);
          if(!del_路径_dct[obj.组件id]){del_路径_dct[obj.组件id]=[obj.进程id]}
          else{
            if(!del_路径_dct[obj.组件id].includes(obj.进程id)){

              del_路径_dct[obj.组件id].push(obj.进程id)
            }}
          // console.log("要删除的进程#########1:","delete_lst",JSON.parse(JSON.stringify(res.delete_lst)))
          if(this.page_dict[obj.组件id].process_id==obj.进程id && del_id!=obj.组件id){
            res.postput[obj.组件id]={process_id:null}
            del_temp_dct[obj.组件id]=true;
          }
          let 待处理列表2=this.del_process_from__x({
            flag:"删除指定路径",
            路径:obj.路径,
            进程id:obj.进程id,
            组件id:obj.组件id,
          });
          // console.log("要删除的进程#########2:","删除指定路径",JSON.parse(JSON.stringify(待处理列表)))
          待处理列表 = [...待处理列表, ...待处理列表2];
        }
        //遍历要删除的
        for (let 组件id_ in del_路径_dct){
          if(组件id_==del_id){continue}
          for (let idx in del_路径_dct[组件id_]){
            let 进程id_=del_路径_dct[组件id_][idx];
            res.delete_lst.push(组件id_+'.process_from.'+进程id_);
          }
        }
        let while_true=true;
        let has_process_id={};
        let add_new_prcess={};
        while(while_true){
          while_true=false;
          //遍历要删除process_id的组件    重新获取process_id
          for (let 组件id in del_temp_dct){
            if(!has_process_id[组件id]){
              let new_process=this.del_process_from_get_process_id({
                del_路径_dct:del_路径_dct,
                del_id:del_id,
                组件id:组件id,
                add_new_prcess:add_new_prcess,
                del_line:del_line
              })
              if (new_process){
                while_true=true;
                has_process_id[组件id]=true;
                add_new_prcess[组件id]=JSON.parse(JSON.stringify(new_process[组件id].process_from));
                lhp_deepcopy1(res.postput,new_process);
              }
            }
          }

        }
        return res
      },
    
    get_process_lst_by_process_id:function(temp_id,process_id){
      return this.page_dict[temp_id].process_from[process_id]
    },
    return_str:function(a){return Object.keys(a).sort().map(k => `${k}__${Object.keys(a[k]).sort((a, b) => a - b).join('_')}`).join('')},

    //建立连线后 建立相应的触发关系  【触发函数:如客户http请求后的回调函数   被动函数:如def a():return 's'可以随时调用的函数，一个是必须等客户请求后才会运行，一个是随时可以调用。当被动函数的传参由触发函数构成时，被动函数的类型转为触发函数。          设置这个触发类和被动类是后台解析数据时编排函数运行顺序时需要使用【在函数获取到所有触发函数传递过来的传参后，主动调用被动函数获取剩余的传参】
    set_tree_types:function(out_id,in_id){
      let out_temp=this.page_dict[out_id];
      let lst=[];
      let res={};
      if (out_temp.tree_type=='1'){
        lst.push(
          {
            out_id:out_id,
            in_id:in_id,
            tree_from:out_temp.tree_from
          }
        )}
        
        while (lst.length>0){
          let pop_item=lst.pop()
          let now_out_id=pop_item.out_id;
          let now_in_id=pop_item.in_id;
          let tree_from=pop_item.tree_from;
          //如果目标已经为1 那么不处理
          if(this.page_dict[now_in_id].tree_type=='1'){continue}
          else{
            //如果目标已经在新增 那么跳过
            if(res[now_in_id]){continue}
            let new_tree_from=JSON.parse(JSON.stringify(tree_from));
            new_tree_from.push(now_in_id);
            res[now_in_id]={
              tree_type:'1',
              tree_from:new_tree_from
            }
            //遍历目标的所有输出项 添加进待处理队列中
            let out_k=this.page_dict[now_in_id].out_kwargs;
            if (out_k){
              for (let k in out_k){
                if (out_k[k].out_params){
                  for (let iin_id in out_k[k].out_params){
                    lst.push(
                      {
                        out_id:now_in_id,
                        in_id:iin_id,
                        tree_from:new_tree_from
                      })
                  }
                }
                
              }
            }
          }
           
              
              

        }
        return res
    },
    //删除组件 或者删除连线时 删除相应的触发关系  
    del_tree_types:function(obj){
      let del_id=obj.del_id;
      let del_line=obj.del_line;
      let out_id=obj.out_id;
      let in_id=obj.in_id;
      let out_temp=this.page_dict[out_id];
      let lst=[];
      let del_dct={};
      let new_dct={};
      let res={
      }
      if(in_id){
        let in_temp=this.page_dict[in_id];
        //删除的是一个连线 如果输入组件的tree_type来源于out 那么删除
        if(out_temp.tree_from && in_temp.tree_from && ((out_temp.tree_from.join("_")+"_"+in_id) == in_temp.tree_from.join("_"))){
          lst.push({
            out_id:in_id,
            tree_from:in_temp.tree_from
          })
        }
        del_line=[out_id,in_id]
      }else{
        //删除的是一个组件
        if(out_temp.tree_type=='1'){
          lst.push({
            out_id:out_id,
            tree_from:out_temp.tree_from
          })
        }
      }
      
        while (lst.length>0){
          let now_obj=lst.pop();
          if(now_obj.out_id!=del_id){
            res[now_obj.out_id]={
              tree_type:0,
              tree_from:null
            }
            del_dct[now_obj.out_id]=true;
          }
          //遍历输出项 添加入队列
          out_k=this.page_dict[now_obj.out_id].out_kwargs
          let tree_from_str=now_obj.tree_from.join("_");
          if (out_k){
            for (let k in out_k){
              if (out_k[k].out_params){
                for (let iin_id in out_k[k].out_params){
                  let iin_data=this.page_dict[iin_id];
                  if(iin_data.tree_type=='1'&& (tree_from_str+'_'+iin_id==iin_data.tree_from.join("_"))){
                    lst.push({
            out_id:iin_id,
            tree_from:iin_data.tree_from
                    })
                  }
                }
              }
              
            }
          }
        }

        //遍历删除的tree_from 重新获取tree_from
        let while_true=true;
        console.log("del_dct",del_dct)
        while(while_true){
          while_true=false;
          for(let now_del_id in del_dct){
            if(res[now_del_id].tree_type=='1'){continue}
            //遍历向此id输入的组件 查找是否有tree_type=1的组件 有的话 重新获取tree_from
            let in_k=this.page_dict[now_del_id].in_kwargs;
            console.log("eeeeee 33",now_del_id,JSON.parse(JSON.stringify(in_k)))
            for(let i in in_k){
              try{
                check_id=in_k[i].in_params[0];
                console.log("eeeeee 1")
                if (check_id==del_id){continue}//如果来源为del_id则跳过
                console.log("eeeeee 2")
                if(del_line && del_line[0]==check_id && del_line[1]==now_del_id){continue}//如果来源为删除连线则跳过
                console.log("eeeeee 3")
                if(new_dct[check_id]){
                  while_true=true;
                  let new_tree_from=JSON.parse(JSON.stringify(new_dct[check_id]));
                  new_tree_from.push(now_del_id)
                  res[now_del_id]={
                    tree_type:'1',
                    tree_from:new_tree_from
                  }
                  new_dct[now_del_id]=new_tree_from;
                  break
                }
                console.log("eeeeee 4")
                if(this.page_dict[check_id].tree_type=='1'){
                  if(del_dct[check_id]){continue}
                  while_true=true;
                  let new_tree_from=JSON.parse(JSON.stringify(this.page_dict[check_id].tree_from));
                  new_tree_from.push(now_del_id)
                  res[now_del_id]={
                    tree_type:'1',
                    tree_from:new_tree_from
                  }
                  new_dct[now_del_id]=new_tree_from;
                  break
                }
                }catch{

                }
              }}}



        return res
    },
    _show_template:function(){

      // console.log('dddd')
      if (this.data.now_template_name){
        this.data.init_scroll();
        // console.log('dddd 2')
      let _html=`<${this.data.now_template_name} :db_indexr="db_indexr" var_name="${this.var_name2}":fullscreen="true" ></${this.data.now_template_name}>`
      //加载模板的名称
        // console.log('dddd 3')
        this.data.dom=this.$el.querySelector('.a_1_0_4_5_1')

        // this.data.dom=this.get_ref("edit");
        console.log("#############获取到的dom:",this.data.dom)
      // this.data.dom=this.$el.querySelector('.lhp_show_vue_template_____1_div_edit')
      this.data.dom.innerHTML=_html
      // console.log('dddd 4')
      new Vue({'el':this.data.dom,data:{true:true,is_edit:true,db_indexr:this.data.db_indexr}})
      // console.log('dddd 5')
      //更新数据
        // console.log('dddd 6')
        // this.data.get_config();
      // console.log('dddd 7')
    }
    },
    show_template:function(){
      ttime2(this.check_type,this._show_template,[],[])}
  }  ,//该属性 会自动生成watch data methods的属性  通过watch实现data

  mounted: function () {  
    
  _this.data.全局鼠标操作对象1=_this.deepcopy_data.全局鼠标操作对象1;
//   _this.data.全局鼠标操作对象1.set_up({
//     key:"拖拽前端组件",
//     key2:"鼠标up时回收dom",
//     func:_this.鼠标up时回收dom,
// });
    //设置缩放比 高度 宽度
    _this.data.更改scale=function(val){
      _this.data.scale=Number(val)/100;
      let left=-Number(_this.data.width.replace("px",""))*(1-_this.data.scale)/2;
      let top=-Number(_this.data.height.replace("px",""))*(1-_this.data.scale)/2;
      _this.data.write_style=`width:${_this.data.width};height:${_this.data.height};scale:${_this.data.scale};left:${left};top:${top};`;
    }
    _this.data.change_scale_info={"name":"缩放比","callback":_this.data.更改scale};
    _this.data.scale_key="2";
    _this.data.更改width=function(val){
      val=val.replace("px","");
      _this.data.width=Number(val)+'px';
      let left=-Number(_this.data.width.replace("px",""))*(1-_this.data.scale)/2;
      let top=-Number(_this.data.height.replace("px",""))*(1-_this.data.scale)/2;
      _this.data.write_style=`width:${_this.data.width};height:${_this.data.height};scale:${_this.data.scale};left:${left};top:${top};`;
      _this.data.change_width_info['hovertext']=_this.data.width;
    _this.data.width_key= _this.data.width_key==="104"?'103':'104';
    }
    
    _this.data.发起更改width请求=function(val){
      val=val.replace("px","");
      //更新数据 
      let update_val={
        "type":"change_data",
        type2:'更改width',
        now_select:_this.now_select,
        width:val,
        "path":"page_config.dict.1",
        "data_type":"set_list",//类型 修改数据
        "postput":[{
          
          'path':`page_config.dict.1.dict.${_this.now_select}.dict.1.base_info`,
          'data':{
            width:val+'px',
          }
        }],
        }
        
        _this.data.全局配置对象.更新(update_val);
  }
  
    _this.data.change_width_info={"name":"宽度","callback":_this.data.发起更改width请求};
    _this.data.width_key="4";
    _this.data.更改height=function(val){
      val=val.replace("px","");
      _this.data.height=Number(val)+'px';
      let left=-Number(_this.data.width.replace("px",""))*(1-_this.data.scale)/2;
      let top=-Number(_this.data.height.replace("px",""))*(1-_this.data.scale)/2;
      _this.data.write_style=`width:${_this.data.width};height:${_this.data.height};scale:${_this.data.scale};left:${left};top:${top};`;
      
      _this.data.change_height_info['hovertext']=_this.data.height;
    _this.data.height_key= _this.data.height_key==="106"?'105':'106';
    }
    _this.data.发起更改height请求=function(val){
        //更新数据 
        let update_val={
          "type":"change_data",
          type2:'更改height',
          now_select:_this.now_select,
          height:val,
          "path":"page_config.dict.1",
          "data_type":"set_list",//类型 修改数据
          "postput":[{
            
            'path':`page_config.dict.1.dict.${_this.now_select}.dict.1.base_info`,
            'data':{
              height:val+'px',
            }
          }],
          }
          
          _this.data.全局配置对象.更新(update_val);
    }
    _this.data.change_height_info={"name":"高度","callback":_this.data.发起更改height请求};
    _this.data.height_key="6";
    //设置当前选择的页面图
    _this.data.set_key= async function(path){
      console.log("当前选择.....",path)
      try{

        let path_lst=path.split(".");
        // console.log("111111111111111111")
        _this.now_select=path_lst[path_lst.length-2];
        // console.log("222222222222222222222")
        _this.page_dict=_this.data.全局配置对象.update_obj.data.page_config.dict[1].dict[_this.now_select].dict[1].page_dict;
        // console.log("333333333333333333333")
        _this.base_info=_this.data.全局配置对象.update_obj.data.page_config.dict[1].dict[_this.now_select].dict[1].base_info;
        // console.log("444444444444444444444")
  
        //存放当前渲染的dom
        _this.now_dom_dct={};
        //清空内容
        _this.$refs.write_dom.innerHTML = '';
        // console.log("绘制当前页面 scale")
        //存放
        _this.data.更改scale(_this.base_info.scale);
        _this.data.scale_key=_this.data.scale_key=='2'?'1':'2';
        // console.log("绘制当前页面 height");
        _this.data.更改height(_this.base_info.height);
        // console.log("绘制当前页面 width");
        _this.data.更改width(_this.base_info.width);
        // console.log("绘制当前页面 初始化容器");
        _this.data.初始化容器();
        // console.log("5555555555555555")
      // _this.data.更改scale
        // console.log("绘制当前页面 start");
        await _this.data.绘制当前页面的数据();
        // console.log("绘制当前页面 end");
        //绘制当前页面的界面
        console.log("页面可视化编辑 当前选择now_select:",_this.now_select);
      }catch (err){
        console.log("切换页面 报错",err)
      }
    }
    _this.data.初始化容器=function(){
      try{

        let father_dom=_this.$refs.write_dom;
        // console.log("father_dom:",_this.$refs.write_dom)
        //新建一个dom
        // console.log("初始化容器","新建一个dom");
        let new_dom=document.createElement('a_1_1_1_2_1');
        //设置dom属性 ref值为ref_obj
        // console.log("初始化容器","设置dom属性");
        new_dom.setAttribute('ref','ref_obj');
        //设置vue
        // console.log("初始化容器","设置vue");
        let vue_dct={'el':new_dom,data:{true:true,false:false,null:null,}};
        //设置vue传入参数
        // console.log("初始化容器","设置vue传入参数");
        new_dom.setAttribute(':deepcopy_data',"deepcopy_data"); 
        vue_dct.data.deepcopy_data={__style:{__edit_flag__:false},height:"auto",width:"auto",min_width:"100%",min_height:"100%",flex_grow:"1"};
        new_dom.setAttribute('dom_id', '-1');//组件id
        new_dom.setAttribute('con', '1');//容器属性
        //插入dom
        // console.log("初始化容器","插入dom",father_dom.appendChild)
        father_dom.appendChild(new_dom);  
        //渲染vue组件
        // console.log("初始化容器","渲染vue组件");
        let new_vue=new Vue(vue_dct);
        //获取到刚才渲染的vue对象
        // console.log("初始化容器","获取到刚才渲染的vue对象");
        let new_vue2=new_vue.$refs.ref_obj;
        // console.log("初始化容器","now_dom_dct",new_vue);
        _this.now_dom_dct['-1']={'dom':new_vue2.$el,"vue":new_vue2,'father_dom':father_dom}
      }catch (err){
        console.log("初始化容器失败",err);
      }
    }
    _this.data.设置move描边=function(event){
                  // 获取鼠标当前所在的元素
                  let now_tar= event.target;
                  // console.log("now_tar:",event.target)
                  if(now_tar==_this.old_tar){return}
                  let dom_id =now_tar.getAttribute('dom_id');
                  // console.log("now_tarx1",now_tar,dom_id,_this.now_dom_dct)
                  while(!_this.now_dom_dct.hasOwnProperty(dom_id)){
                    now_tar=now_tar.parentNode;
                    // console.log("now_tarx2",now_tar)
                    dom_id =now_tar.getAttribute('dom_id');
                    if (!now_tar) {
                        return null;
                    }
                  }
                  _this.old_tar=event.target;
                  try{_this.now_dom_dct[_this.old_move_dom_id].vue.data.edit_move_show=false}catch{}
                  // 如果有之前设置的元素，移除其样式
                  if (document.querySelector('.a_1_0_4_5_1_move_outline')) {
                      document.querySelector('.a_1_0_4_5_1_move_outline').classList.remove('a_1_0_4_5_1_move_outline');
                  }
                  // 为当前元素添加样式
                  _this.old_move_dom_id=dom_id;
                  now_tar.classList.add('a_1_0_4_5_1_move_outline');
                  try{_this.now_dom_dct[_this.old_move_dom_id].vue.data.edit_move_show=true}catch{}

    }
    _this.data.设置容器描边=function(event){
      let now_tar= event.target;
      // console.log("设置容器描边",'start');
      if(now_tar==_this.old_con_tar){return}
      if(now_tar.getAttribute('miaobian')){return}
      console.log(
        "容器描边-0:不是同一个dom,开始描边:\n\t\t",
        "当前dom:",now_tar,"\n\t\t",
        "之前dom:",_this.old_con_tar,"\n\t\t",
        ) 
      // console.log("设置容器描边",'开始循环匹配');
      let child_dom_id=null;
      let t_dom_id=null;
      while(1){
        let con_val =now_tar.getAttribute('con');
        if(!Number(con_val)>0){
          if(now_tar.getAttribute("dom_id")){
            child_dom_id=now_tar.getAttribute("dom_id")
          }
          now_tar=now_tar.parentNode;
        }else{
          t_dom_id=now_tar.getAttribute('dom_id');
          // console.log("_this.now_dom_dct[t_dom_id].vue.check_slot(event.target)",_this.now_dom_dct[t_dom_id].vue.check_slot(event.target),t_dom_id,event.target,)
          let ref_=_this.now_dom_dct[t_dom_id].vue.check_slot(event.target);
          if(ref_){
            console.log(
              "容器描边-1:匹配到插槽:\n\t\t",
              "插槽ref:",ref_,"\n\t\t",
              "容器id:",t_dom_id,"\n\t\t",
              ) 
            break;
          }else{
            child_dom_id=t_dom_id;
            now_tar=now_tar.parentNode;
          }
        }
      }
      
      console.log(
        "容器描边-2:移除旧插槽位置",
        ) 
      // console.log("设置容器描边",'获取容器id');
      let dom_id=now_tar.getAttribute('dom_id');
      // // 如果有之前设置的元素，移除其样式
      // console.log("设置容器描边",'移除其样式');
      if (document.querySelector('.a_1_0_4_5_1_move_outline')) {
          document.querySelector('.a_1_0_4_5_1_move_outline').classList.remove('a_1_0_4_5_1_move_outline');
      }
      try{_this.now_dom_dct[_this.old_move_dom_id].vue.data.edit_move_show=false}catch{}
      //删除旧的容器显示
      // console.log("设置容器描边",'删除旧的容器显示');
      try{_this.now_dom_dct[_this.old_father_id].vue.con_del();}catch (err){console.log("del_err",err);
}
      _this.old_con_dom=now_tar;
      _this.old_father_id=dom_id;
      console.log("_this.old_father_id",dom_id)
      _this.old_con_tar=event.target;
      // 为当前元素添加样式
      // console.log("设置容器描边",'为当前元素添加样式');
      now_tar.classList.add('a_1_0_4_5_1_move_outline');
      
        // 为当前元素添加样式
        _this.old_move_dom_id=dom_id;
        try{_this.now_dom_dct[_this.old_move_dom_id].vue.data.edit_move_show=true}catch{}
      //显示容器插入内容
      if(child_dom_id==dom_id){
        child_dom_id=null;
        _this.old_before_id=null;
      }else{
        _this.old_before_id=child_dom_id;
        console.log("child_dom_id",child_dom_id)
        if(child_dom_id){
          child_dom_id= _this.now_dom_dct[child_dom_id].dom;
        }
        console.log("child_dom_id end",child_dom_id)
      }
      
      console.log(
        "容器描边-3:显示方式:\n\t\t",
        child_dom_id?'插入到鼠标dom之前':"追加到父容器最后"
        ) 
      _this.old_con_ref=_this.now_dom_dct[_this.old_father_id].vue.check_slot(event.target);//插槽名称  一个组件可以拥有多个插槽 通过函数获取到插槽名称
      //显示当前容器要插入的位置
      console.log(
        "容器描边-4:描绘插槽位置:\n\t\t",
        "插槽ref:",_this.old_con_ref,"\n\t\t",
        "容器id:",_this.old_father_id,"\n\t\t",
        ) 
        try{

          _this.now_dom_dct[_this.old_father_id].vue.con_add({dom:child_dom_id,'ref':_this.old_con_ref});
          console.log(
            "容器描边-4:描绘完毕:\n\t\t",
            ) 
        }catch (err){
          console.log(
            "容器描边-4:描绘出错:\n\t\t",err
            ) 
        }
    }
    _this.data.删除move描边=function(event){
      // 如果有之前设置的元素，移除其样式
      if (document.querySelector('.a_1_0_4_5_1_move_outline')) {
          document.querySelector('.a_1_0_4_5_1_move_outline').classList.remove('a_1_0_4_5_1_move_outline');
      }
      
      try{_this.now_dom_dct[_this.old_move_dom_id].vue.data.edit_move_show=false}catch{}
      try{
        _this.now_dom_dct[_this.old_father_id].vue.con_del();
      }catch{}
      _this.old_con_tar=null;
      _this.old_father_id=null;
      _this.old_con_dom=null;

      _this.old_move_dom_id=null;
      _this.old_tar=null;
    }
    _this.data.删除容器插入位=function(){
      try{
        _this.now_dom_dct[_this.old_father_id].vue.con_del();
      }catch{}
      try{_this.now_dom_dct[_this.old_move_dom_id].vue.data.edit_move_show=false}catch{}
      _this.old_con_tar=null;
      _this.old_father_id=null;
      _this.old_con_dom=null;
      _this.old_move_dom_id=null;

    }

    _this.data.选择组件=function(key){
      //消除之前的选择事情
      // _this.data.clear_select();
      //添加当前的选择事件
      _this.data.start_select(key);
      
      window['浮动窗口当前显示'].set("前端组件属性编辑框");
      window['前端组件属性编辑框'].now_select=_this.now_select;
      window['前端组件属性编辑框'].key=key;
      }




    _this.data.移动前端组件up=function(event){
      
  }
_this.data.select_temp={};
_this.data.select_line={};
_this.data.start_select=function(key){
let selector=document.querySelector('.a_1_0_4_5_1_click_outline');
  if (selector) {
    selector.classList.remove('a_1_0_4_5_1_click_outline');
}
// console.log("设置容器描边",'为当前元素添加样式');
_this.now_dom_dct[key].dom.classList.add('a_1_0_4_5_1_click_outline');


}
_this.data.删除组件_更新父容器排序=function(组件id){
  let 组件info=_this.page_dict[组件id];
  let postput_con_lst={};
  let delete_obj=null;
  if(组件info.base_info.father_id=='-1'){
    delete_obj=`page_config.dict.1.dict.${_this.now_select}.dict.1.base_info.con_dct.${组件info.base_info.ref}`;
    postput_con_lst={
      'path':`page_config.dict.1.dict.${_this.now_select}.dict.1.base_info.con_dct`,
      data:{}
    }
    let con_lst=JSON.parse(JSON.stringify(_this.base_info.con_dct[组件info.base_info.ref]));
      con_lst.splice(con_lst.indexOf(组件id), 1);
    postput_con_lst.data[组件info.base_info.ref]=con_lst;
  }else{
    delete_obj=`page_config.dict.1.dict.${_this.now_select}.dict.1.page_dict.${组件info.base_info.father_id}.base_info.con_dct.${组件info.base_info.ref}`;
    postput_con_lst={
      'path':`page_config.dict.1.dict.${_this.now_select}.dict.1.page_dict.${组件info.base_info.father_id}.base_info.con_dct`,
      data:{}
    }
    let con_lst=JSON.parse(JSON.stringify(_this.page_dict[组件info.base_info.father_id].base_info.con_dct[组件info.base_info.ref]));
      con_lst.splice(con_lst.indexOf(组件id), 1);
    postput_con_lst.data[组件info.base_info.ref]=con_lst;
  }
  console.log("{postput_con_lst,delete_obj}",{postput_con_lst,delete_obj})
  return {postput_con_lst,delete_obj}
}
_this.data.删除组件_删除的组件数组=function(组件id){
  let del_lst=[组件id];
  let del_=[组件id];
  while (del_.length){
    let id__=del_.pop();
    let 被删除的组件数据=_this.page_dict[id__];
    console.log("删除组件_删除的组件数组11:",_this.page_dict,id__)
    if(被删除的组件数据.base_info.con){//如果是容器类组件 那么将保存在此容器内的组件全部删除
      let con_d=被删除的组件数据.base_info.con_dct;
      console.log("删除组件_删除的组件数组22:",_this.page_dict,id__)
      if(con_d){
        for(let k in con_d){
          for(let j=0;j<con_d[k].length;j++){
            del_lst.push(con_d[k][j]);
            del_.push(con_d[k][j]);
          }
        }
      }
    }
  }
  return del_lst
}
_this.data.删除组件=function(组件id){
  //修改存放此组件的 容器排序
  let up_lst=_this.data.删除组件_更新父容器排序(组件id);
  let del_lst=_this.data.删除组件_删除的组件数组(组件id);
  //发送请求
  let update_val={
    "type":"change_data",
    "type2":"删除前端组件",
    'temp_id':组件id ,
    'now_select':_this.now_select,
    "path":"page_config.dict.1",
    "data_type":"set_list",//类型 修改数据
    "postput":[up_lst.postput_con_lst],
    "delete":[{
      path:up_lst.delete_obj
    }],
    "delete2":[{
      "delete_before":`page_config.dict.1.dict.${_this.now_select}.dict.1.page_dict`,
      lst:del_lst
    }]
  }
  _this.data.全局配置对象.更新(update_val);
}
_this.data.弹出组件右击窗口=function(event){
  let 组件id=_this.old_move_dom_id;
  window.select3__({
    event,menu_data:[{"text":'删除'}],vue_name:"select3_____menu_default_item",callback:function(select){
      if(select==0){
        _this.data.删除组件(组件id);
      }
    }
  })
}
_this.data.选择组件=function(key){
console.log("选择组件",key);
//消除之前的选择事情
// _this.data.clear_select();
// //添加当前的选择事件
_this.data.start_select(key);

window['浮动窗口当前显示'].set("前端组件属性编辑框");
window['前端组件属性编辑框'].now_select=_this.now_select+'_'+key;
// window['前端组件属性编辑框'].key=key;
}


  _this.data.修改组件名称=function(key,name){
    console.log("修改组件名称",key,name)
    let out_id=key.split("_")[1];//this.now_select_temp
    
    let update_val={
      "type":"change_data",
      "type2":"修改组件名称",
      'key':key,
      name:name,
      'now_select':_this.now_select,
      "path":"page_config.dict.1",
      "data_type":"set_list",//类型 修改数据
      "postput":[{
        'path':`page_config.dict.1.dict.${_this.now_select}.page_dict.${out_id}`,
        'data':{'name':name}
      }]
    }
    _this.data.全局配置对象.更新(update_val);
  }
  _this.data.移动前端组件move=function(event){
    let data=_this.data.全局鼠标操作对象1.get_data({
      key:"移动前端组件"})
      let new_x=data.x+(event.clientX-data.mousex)/_this.data.scale;
      let new_y=data.y+(event.clientY-data.mousey)/_this.data.scale;
      if(new_x<0){new_x=0}
      if(new_y<0){new_y=0}
      if(new_x>Number(_this.data.width.replace("px",""))){new_x=Number(_this.data.width.replace("px",""))-10}
      if(new_y>Number(_this.data.height.replace("px",""))){new_y=Number(_this.data.width.replace("px",""))-10}
      a_1_0_4_5_1_dom_dct[data.key].vue.data.x=new_x;
      a_1_0_4_5_1_dom_dct[data.key].vue.data.y=new_y;
      _this.data.更新目标连线(data.key);
  }
  _this.sleep=function sleep(ms) {  
    return new Promise(resolve => setTimeout(resolve, ms));  
}  

_this.data._init_dct={};
_this.data.get_out_xy_in_xy=function(page_id){
  if(!_this.data._init_dct[page_id]){
    let page_id2=page_id.split("_")[1];
    console.log("_this.page_dict[page_id].name",_this.page_dict,page_id,page_id2)
    let obj=a_1_0_4_5_1_get_wh({
      'context':_this.page_dict[page_id2].name,
      'class':"a_1_0_4_5_1_class1 ddd"
    });
    let width=obj.width;
    let circle_style_left=width/2-6;
    let x=_this.page_dict[page_id2].x;
    let y=_this.page_dict[page_id2].y;
    _this.data._init_dct[page_id]= {
      in_xy:{x:x+circle_style_left,y:y-12},
      out_xy:{x:x+circle_style_left,y:y+24}
    }
  }
  return _this.data._init_dct[page_id]
}
    _this.data.绘制当前页面的数据=async function(){
      await a_1_0_4_5_1_create({
        页面id:_this.now_select,
        配置:全局配置对象.update_obj.data,
        _this:_this
      })
    }
    let getQueryParams=function() {  
      const queryParams = {};  
      const urlParams = new URLSearchParams(window.location.search);  
      for (const [key, value] of urlParams.entries()) {  
          queryParams[key] = value;  
      }  
      return queryParams; 
      
  }  
    _this.data.协同数据处理=function(obj){
      console.log("前端页面可视化界面 接收协同数据处理:",obj)
      if(obj.type2=='新增组件'){
        
        let info=JSON.parse(JSON.stringify(obj.postput[0].data.base_info));
        //创建组件
        let new_dom=document.createElement(info.temp_id+'_'+info.version);
        for (let k in info){
          if (k!='data'){
            new_dom.setAttribute(k,info[k]);
          }
        }
        let dom_id=obj.postput[0].path.split(".")
        dom_id=dom_id[dom_id.length-1];

        new_dom.setAttribute('dom_id',dom_id);//设置id
        new_dom.setAttribute('ref','ref_obj');//设置ref
        let project_info=getQueryParams();//获取项目信息
        let 项目所有者id=project_info.user_id;
        let 项目目录id=project_info.project_dir;
        let 项目id=project_info.project_id;
        let 页面id=_this.now_select;
        let 组件id=dom_id;
        new_dom.id=`id_${项目所有者id}_${项目目录id}_${项目id}_${页面id}_${组件id}`;
        let deepcopy_data=JSON.parse(JSON.stringify(info.data||{}));
        // console.log("新增组件1")
      if (obj.before_id) {
        if(!_this.now_dom_dct[obj.father_id].vue.return_slot_dom){
          _this.now_dom_dct[obj.father_id].vue.$refs[obj.ref_val].insertBefore(new_dom,_this.now_dom_dct[obj.before_id].dom);
        }else{
          let father_d=_this.now_dom_dct[obj.father_id].vue.return_slot_dom(obj.ref_val);
          father_d.insertBefore(new_dom,_this.now_dom_dct[obj.before_id].dom);
        }
      } else {
        if(!_this.now_dom_dct[obj.father_id].vue.return_slot_dom){
          _this.now_dom_dct[obj.father_id].vue.$refs[obj.ref_val].appendChild(new_dom);
        }else{
          let father_d=_this.now_dom_dct[obj.father_id].vue.return_slot_dom(obj.ref_val);
          father_d.appendChild(new_dom);
        }
        // 如果 child_dom 是 null，则将新元素添加到 father_dom 的末尾
      }
      // console.log("新增组件2")
      let vue_dct={'el':new_dom,data:{true:true,false:false,null:null}};
      //如果使用了vuetify 那么添加进来
      if(info.use_vue){
        for(let i=0;i<info.use_vue.length;i++){
          vue_dct[info.use_vue[i]]=window[info.use_vue[i]];
        }
      }
      // //设置vue传入参数
      new_dom.setAttribute(':deepcopy_data',"deepcopy_data");
      deepcopy_data.edit_flag=true;//设置为编辑属性
      vue_dct.data.deepcopy_data=deepcopy_data;
      let new_vue=new Vue(vue_dct);
      let new_vue2=new_vue.$refs.ref_obj;
      _this.now_dom_dct[dom_id]={'dom':new_vue2.$el,"vue":new_vue2,'father_id':obj.father_id,'ref_val':obj.ref_val}


      }else if(obj.type2=='更新前端组件属性'){
    if (obj.page_id==_this.now_select){
      console.log("前端可视化编辑界面   ---前端组件属性 开始")

      if(obj.temp2){
        
          let change_vue_obj=_this.now_dom_dct[obj.temp2.temp_id].vue.data;
          let key1=obj.temp2.key1;
          if(key1){
            if (key1[0]=='.'){
              key1=key1.slice(1);
            }
            let key1_lst=key1.split('.');
            for(let i=0;i<key1_lst.length;i++){
                change_vue_obj=change_vue_obj[key1_lst[i]];
            }
            _this.$set(change_vue_obj,obj.temp2.key2, JSON.parse(JSON.stringify(obj.value)));
          }
          _this.$set(change_vue_obj,obj.temp2.key2, JSON.parse(JSON.stringify(obj.value)));
      }else{
        let change_vue_obj=_this.now_dom_dct[obj.temp_id].vue.data;
        let key1=obj.key1;
        // console.log("change_vue_obj",change_vue_obj)
        if(key1){
          if (key1[0]=='.'){
            key1=key1.slice(1);
          }
          let key1_lst=key1.split('.');
          for(let i=0;i<key1_lst.length;i++){
              change_vue_obj=change_vue_obj[key1_lst[i]];
          }
          // console.log("change_vue_obj",change_vue_obj)
          // console.log("obj.key2",obj.key2)
          // console.log("obj.value",obj.value)
          _this.$set(change_vue_obj,obj.key2, obj.value);
        }
        _this.$set(change_vue_obj,obj.key2, obj.value);
      }
      
    console.log("前端可视化编辑界面   ---前端组件属性 更新完毕")
    _this.show_0_key=_this.show_0_key=='1'?'0':'1';
    }
  }else if(obj.type2=="添加前端组件属性_新增项"){
    if (obj.page_id==_this.now_select){
      console.log("_this.now_dom_dct[obj.temp_id]",_this.now_dom_dct[obj.temp_id])
      let path_before=obj.path_before;
      let path_before_lst=path_before.split(".");
      let change_vue_obj=_this.now_dom_dct[obj.temp_id].vue.data;
      let set_obj=_this.data.全局配置对象.update_obj.data;
      for (let i=0;i<path_before_lst.length;i++){
        set_obj=set_obj[path_before_lst[i]];
      }
      _this.$set(change_vue_obj,path_before_lst[path_before_lst.length-1],JSON.parse(JSON.stringify(set_obj)));
    }
  }else if(obj.type2=="添加前端组件属性_删除项"){
    if (obj.page_id==_this.now_select){
      console.log("_this.now_dom_dct[obj.temp_id]",_this.now_dom_dct[obj.temp_id])
      let path_before=obj.path_before;
      let path_before_lst=path_before.split(".");
      let change_vue_obj=_this.now_dom_dct[obj.temp_id].vue.data;
      let set_obj=_this.data.全局配置对象.update_obj.data;
      for (let i=0;i<path_before_lst.length-1;i++){
        set_obj=set_obj[path_before_lst[i]];
      }
      console.log("删除项",change_vue_obj,path_before_lst[path_before_lst.length-2],set_obj)
      _this.$set(change_vue_obj,path_before_lst[path_before_lst.length-2],JSON.parse(JSON.stringify(set_obj)));
    }
  }else if(obj.type2=="删除前端组件"){
    let del_lst=obj.delete2[0].lst;
    for(let i=0;i<del_lst.length;i++){
      _this.now_dom_dct[del_lst[i]].dom.parentNode.removeChild(_this.now_dom_dct[del_lst[i]].dom);
      delete _this.now_dom_dct[del_lst[i]];
    }
  }
      
    }
    _this.data.更新目标连线=function(key){
      // console.log("更新.")
      //获取当前页面id  和  组件id
      let temp_v=key.split("_");
      let page_id=temp_v[0];
      let temp_id=temp_v[1];
      if (page_id!==_this.now_select){return}//如果不是当前页面图 那么取消
      //获取目标入参位置
      let in_xy=window.a_1_0_4_5_1_dom_dct[key].vue.return_circle_xy2();
      let in_x=in_xy.x,in_y=in_xy.y;
      //获取目标出参位置
      let out_xy=window.a_1_0_4_5_1_dom_dct[key].vue.return_circle_xy1();
      let out_x=out_xy.x,out_y=out_xy.y;
      //获取目标 所有输出到入参的 id
      let in_dcts=_this.page_dict[temp_id].in;
      let out_dcts=_this.page_dict[temp_id].out;
      let out_lst=[];
      let in_lst=[];
      for (let k in in_dcts){
        let idx=page_id+'_'+in_dcts[k].in_id;
        out_lst.push([idx,window.a_1_0_4_5_1_dom_dct[idx].vue.return_circle_xy2()]);
      }
      for (let k in out_dcts){
        let idx=page_id+'_'+out_dcts[k].out_id;
        in_lst.push([idx,window.a_1_0_4_5_1_dom_dct[idx].vue.return_circle_xy1()]);
      }
      for(let i=0;i<in_lst.length;i++){
        window.a_1_0_4_5_1_line_dct[key+'=>'+in_lst[i][0]].vue.data.xy=JSON.stringify({x2:in_lst[i][1].x,y2:in_lst[i][1].y,x1:in_x,y1:in_y})
      }
      for(let i=0;i<out_lst.length;i++){
        // console.log("key+'=>'+out_lst[i][0]]",key+'=>'+out_lst[i][0])
        window.a_1_0_4_5_1_line_dct[out_lst[i][0]+'=>'+key].vue.data.xy=JSON.stringify({x1:out_lst[i][1].x,y1:out_lst[i][1].y,x2:out_x,y2:out_y})
      }
    }
    _this.data.删除目标连线=function(key){
      for(k in window.a_1_0_4_5_1_line_dct){
        if(k.includes(key)){
          window.a_1_0_4_5_1_line_del(k)
        }
      }
    }
    _this.data.初始化数据=function(obj){
      let base_info=obj.base_info;
      let data_v={};
      base_info['vue_name']='a_1_0_2_35_1';
      base_info['father_id']=_this.old_father_id;
      base_info['before_id']=_this.old_before_id;
      base_info['data2father']={"flag":false,"name":" _ ",flag2:false,father_id:""};
      base_info['ref']= _this.old_con_ref;//父组件插入的插槽名称
      base_info.css="";//组件的css
      base_info.js="";//组件的js
      if(base_info.con){//容器组件 存放子组件的排列顺序
        base_info.con_dct={};
      }
      //添加编辑专用 配置
      if(!base_info.data_info){
        base_info.data_info=[];
      }
      //如果组件是con2容器 那么显示body_data属性框
      if(base_info.con=='2'){
        base_info.data_info.unshift(0,
          {
            name: 'body_data',
            ch_name: '属性列表',
            note: "属性列表",
            default:[],
            type: "list_text",
          });
          data_v.body_data=[];
      }
      //如果组件是属性容器1
      if(base_info.father_data=='1'){
      base_info.data_info.unshift(0,
        {
          name: '__father_data',
          ch_name: '属性容器',
          note: "属性容器",
          type: "dict2",
          dict:[]
        });
        data_v.__father_data={};
      }
      


      base_info.data_info.unshift(0,
  
        {
          name: '__style',
          ch_name: '样式',
          note: "样式",
          type: "dict2",
          dict:[
        {
          name: '__edit_flag__',
          ch_name: '辅助开关',
          note: "可视化编辑模式下的一些辅助线",
          type: "bool",
          default: false,
          },
          {
            name: '__margin',
            ch_name: '外距',
            note: "外距",
            default: 'null',
            type: "select_eval",
            select_list_eval: [-1,24,"${(i<0)?'null':(i+'')}","${(i<0)?'null':(i*4+'px')}"]
            },
          {
          name: '__margin_x',
          ch_name: '外距-左右',
          note: "外距-左右",
          default: 'null',
          type: "select_eval",
          select_list_eval: [-1,24,"${(i<0)?'null':(i+'')}","${(i<0)?'null':(i*4+'px')}"]
          },
          {
              name: '__margin_y',
              ch_name: '外距-上下',
              note: "外距-上下",
              default: 'null',
              type: "select_eval",
              select_list_eval: [-1,24,"${(i<0)?'null':(i+'')}","${(i<0)?'null':(i*4+'px')}"]
          },
        {
          name: '__margin_left',
          ch_name: '左外距',
          note: "左外距",
          default: 'null',
          type: "select_eval",
          select_list_eval: [-1,24,"${(i<0)?'null':(i+'')}","${(i<0)?'null':(i*4+'px')}"]
          },
        {
          name: '__margin_right',
          ch_name: '右外距',
          note: "右外距",
          default: 'null',
          type: "select_eval",
          select_list_eval: [-1,24,"${(i<0)?'null':(i+'')}","${(i<0)?'null':(i*4+'px')}"]
          },
        {
          name: '__margin_top',
          ch_name: '上外距',
          note: "上外距",
          default: 'null',
          type: "select_eval",
          select_list_eval: [-1,24,"${(i<0)?'null':(i+'')}","${(i<0)?'null':(i*4+'px')}"]
          },
        {
          name: '__margin_bottom',
          ch_name: '下外距',
          note: "下外距",
          default: 'null',
          type: "select_eval",
          select_list_eval: [-1,24,"${(i<0)?'null':(i+'')}","${(i<0)?'null':(i*4+'px')}"]
          },
          {
          name: '__padding',
          ch_name: '内距',
          note: "内距",
          default: 'null',
          type: "select_eval",
          select_list_eval: [-1,24,"${(i<0)?'null':(i+'')}","${(i<0)?'null':(i*4+'px')}"]
          },
          {
              name: '__padding_x',
              ch_name: '内距-左右',
              note: "内距-左右",
              default: 'null',
              type: "select_eval",
              select_list_eval: [-1,24,"${(i<0)?'null':(i+'')}","${(i<0)?'null':(i*4+'px')}"]
          },
          {
          name: '__padding_y',
          ch_name: '内距-上下',
          note: "内距-上下",
          default: 'null',
          type: "select_eval",
          select_list_eval: [-1,24,"${(i<0)?'null':(i+'')}","${(i<0)?'null':(i*4+'px')}"]
          },
        {
          name: '__padding_left',
          ch_name: '左内距',
          note: "左内距",
          default: 'null',
          type: "select_eval",
          select_list_eval: [-1,24,"${(i<0)?'null':(i+'')}","${(i<0)?'null':(i*4+'px')}"]
          },
        {
          name: '__paddint_right',
          ch_name: '右内距',
          note: "右内距",
          default: 'null',
          type: "select_eval",
          select_list_eval: [-1,24,"${(i<0)?'null':(i+'')}","${(i<0)?'null':(i*4+'px')}"]
          },
        {
          name: '__padding_top',
          ch_name: '上内距',
          note: "上内距",
          default: 'null',
          type: "select_eval",
          select_list_eval: [-1,24,"${(i<0)?'null':(i+'')}","${(i<0)?'null':(i*4+'px')}"]
          },
        {
          name: '__padding_bottom',
          ch_name: '下内距',
          note: "下内距",
          default: 'null',
          type: "select_eval",
          select_list_eval: [-1,24,"${(i<0)?'null':(i+'')}","${(i<0)?'null':(i*4+'px')}"]
          },
          ]
        }
    
    )
      base_info.data_info.unshift(0,{
        "name": "var_name",
        "ch_name": "全局变量名",
        "default": "",
        "note": "通过windows.组件全局变量名 访问该vue.data",
        "type": "str"
      })
      data_v['var_name']='';
      data_v['__style']={
        __edit_flag__:true,
        __margin: 'null',
        __margin_x: 'null',
        __margin_y: 'null',
        __margin_right: 'null',
        __margin_left: 'null',
        __margin_top: 'null',
        __margin_bottom: 'null',
        __padding: 'null',
        __padding_x: 'null',
        __padding_y: 'null',
        __padding_left: 'null',
        __paddint_right: 'null',
        __padding_top: 'null',
        __padding_bottom: 'null',
    };
      if(base_info.data){
        let copy_d=JSON.parse(JSON.stringify(base_info.data));
        lhp_deepcopy1(data_v,copy_d);
      }
      base_info.data=data_v;
  
      if(!base_info.deepcopy_data){base_info.deepcopy_data={}}
      base_info.deepcopy_data['name']=base_info['name'];
      
    }
    _this.data.更新父容器排序=function(obj){
      //插槽排序
      let father_con_dct=null;
      let father_path=null;
      // console.log("更新父容器排序",1,_this.old_father_id);
      if(_this.old_father_id=='-1'){
        father_path=`page_config.dict.1.dict.${_this.now_select}.dict.1.base_info.con_dct`;
        father_con_dct=_this.base_info.con_dct||{};
      }else{
        father_path=`page_config.dict.1.dict.${_this.now_select}.dict.1.page_dict.${_this.old_father_id}.base_info.con_dct`;
            // console.log(_this.page_dict,_this.old_father_id)
        father_con_dct=_this.page_dict[_this.old_father_id].base_info.con_dct||{};
      }
      // console.log("更新父容器排序",2,father_con_dct);
      if(!father_con_dct[_this.old_con_ref]){father_con_dct[_this.old_con_ref]=[]}
      if(!_this.old_before_id){father_con_dct[_this.old_con_ref].push('@add_index')}
      else{
          let index = father_con_dct[_this.old_con_ref].indexOf(_this.old_before_id);
          father_con_dct[_this.old_con_ref].splice(index, 0,"@add_index");
      }

      // console.log("更新父容器排序",3);
      return {
        path:father_path,
        data:father_con_dct,
      }
    }
    //上传更改数据
    //_this.data.新增组件
    _this.data.新增组件=function(event,info){
      
    let xy=_this.get_x_y2(event,"write_dom")
    console.log("拖拽进来的组件数据:",info)
    let base_info=JSON.parse(JSON.stringify(info));
    _this.data.初始化数据({
      base_info,
    })
    
      //   //更新数据
        let update_val={
          "type":"change_data",
          "data_type":"set_list",//类型 修改数据
          "type2":"新增组件",
          "path":"page_config.dict.1",
          "father_id":_this.old_father_id,//父组件id
          "before_id":_this.old_before_id,//在哪一个兄弟节点前面
          "ref_val":_this.old_con_ref,//父组件的哪一个插槽的ref
          // 'info':JSON.parse(JSON.stringify(info)),//要插入的数据
          // page_config.dict.1.dict.页面id.dict.1
          update_params:[
            {
              name:'@add_index',
              path:`page_config.dict.1.dict.${_this.now_select}.dict.1.base_info.index`,//数据路径
              use:'++s'
            }
          ],
          "postput":[
            //新增的组件
            {
              'path':`page_config.dict.1.dict.${_this.now_select}.dict.1.page_dict.@add_index`,
              'data':{
                "base_info":base_info,
                "dict":{}
              }
            },
            //容器排序
            _this.data.更新父容器排序(),
            //更新索引
            {
              'path':`page_config.dict.1.dict.${_this.now_select}.dict.1.base_info`,
              'data':{"index":"@add_index"}
            },
          ],
        }
        _this.data.全局配置对象.更新(update_val);
        window.上传服务器时间=new Date().getTime();
    }
    //添加新的组件
    // _this.data.add();
    //添加新的连接
    
    //清空所有内容

    //按照选择的










    this.project_post=request______({method:'post',url:'/run_page',error_run_func:function(data){if (data.error_code==1){window.location.href = '/login';}}})
    this.url_params=get_url_params()

      if (_this.show_flag){_this.data.show_flag=_this.show_flag}
      // console.log('test',_this.$el)
      _this.data.set_template=function(template_name){
        console.log("数据库html可视化 设置template_name",template_name);
        _this.data.now_template_name=template_name
        _this.show_template()
      }
    _this.data.change_db_indexr=function(db_indexr){
      console.log("数据库html可视化 设置dbindexr",db_indexr);
      _this.data.db_indexr=db_indexr}
    
    _this.data.init_scroll=function(){

      var scrollableElement = _this.get_ref("scroll");
  window.scrollableElement=scrollableElement;
      // 确保元素有滚动条  
      if (scrollableElement.scrollHeight > scrollableElement.clientHeight) {  
      // 设置滚动位置  
        scrollableElement.scrollTop =(scrollableElement.scrollHeight - scrollableElement.clientHeight) / 2;
      }
      if(scrollableElement.scrollWidth>scrollableElement.clientWidth){
        scrollableElement.scrollLeft = (scrollableElement.scrollWidth-scrollableElement.clientWidth)/2; 
      }
    }
    
  document.addEventListener('click', this.handleGlobalClick);
    //初始化滚动轴
    ttime3(_this,'scroll',_this.data.init_scroll);

// 辅助函数：获取元素的scale值
function getTransformScale(el) {
  var transform = window.getComputedStyle(el).transform || el.style.transform || 'none';
  var matrix = transform.match(/^matrix3d\((.+)\)$/);
  if (matrix) {
      return parseFloat(matrix[1].split(', ')[0]) / 1; // sx
  } else {
      var matrix2d = transform.match(/^matrix\((.+)\)$/);
      return matrix2d ? parseFloat(matrix2d[1].split(', ')[0]) : 1; // 默认scale为1
  }
}


    _this.data.设置全屏=function(
    ){
      _this.old_title_display=_this.$refs.title.style.display;
      _this.$refs.title.style.display='none';
      _this.old_end_display=_this.$refs.end.style.display;
      _this.$refs.end.style.display='none';

      let oldStyle = window.getComputedStyle( _this.$refs.write_dom);
      _this.write_dom_old_style_oldWidth = parseFloat(oldStyle.width);
      _this.write_dom_old_style_oldHeight = parseFloat(oldStyle.height);
      _this.write_dom_old_style_oldLeft = _this.$refs.write_dom.offsetLeft; // 注意：offsetLeft 返回的是整数，单位px
      _this.write_dom_old_style_oldTop = _this.$refs.write_dom.offsetTop; // 同上
      _this.write_dom_old_style_oldMarginTop = parseFloat(oldStyle.marginTop);
      _this.write_dom_old_style_oldMarginLeft = parseFloat(oldStyle.marginLeft);
      _this.write_dom_old_style_oldScale = _this.$refs.write_dom.style.scale; // 获取当前的scale值
      _this.$refs.write_dom.style.width = '100%';
      _this.$refs.write_dom.style.height = '100%';
      _this.$refs.write_dom.style.left = '0px';
      _this.$refs.write_dom.style.top = '0px';
      _this.$refs.write_dom.style.marginTop = '0px';
      _this.$refs.write_dom.style.marginLeft = '0px';
      _this.data.更改scale(100);


      window.设置前端编辑区全屏模式();

    }
    _this.data.退出全屏=function(){
      _this.$refs.title.style.display=_this.old_title_display;
      _this.$refs.end.style.display=_this.old_end_display;
      _this.$refs.write_dom.style.scale = _this.write_dom_old_style_oldScale; // 修改scale值
      _this.$refs.write_dom.style.width =  _this.write_dom_old_style_oldWidth+'px';
      _this.$refs.write_dom.style.height =  _this.write_dom_old_style_oldHeight+'px';
      _this.$refs.write_dom.style.marginTop =  '20px';
      _this.$refs.write_dom.style.marginLeft =  '20px';
      window.退出前端编辑区全屏模式();
      _this.data.更改scale(_this.base_info.scale);
      _this.data.scale_key=_this.data.scale_key=='2'?'1':'2';

    }
    _this.data.开全局辅助=function(){
      //恢复所有dom的__style.__edit_flag__值
        for(let k in _this.data.___全局辅助记录值___){
          _this.now_dom_dct[k].vue.data.__style.__edit_flag__=_this.data.___全局辅助记录值___[k];
        }
    }
  _this.data.关全局辅助=function(){
    //记录所有dom的__style.__edit_flag__值 然后全部更改为false
    _this.data.___全局辅助记录值___={};
    // _this.now_dom_dct[dom_id]={'dom':new_vue2.$el,"vue":new_vue2,'father_id':obj.father_id,'ref_val':obj.ref_val}
    for(let k in _this.now_dom_dct){
      _this.data.___全局辅助记录值___[k]=_this.now_dom_dct[k].vue.data.__style.__edit_flag__;
      _this.now_dom_dct[k].vue.data.__style.__edit_flag__=false;
    }

  }
  },
  beforeDestroy() {
    // 确保在组件销毁前移除监听器
    document.removeEventListener('click', this.handleGlobalClick);
  },
} 
  );
  


//组件传入后



// x=[
//     {name:'',icon:'',test}
// ]

window.a_1_0_4_6_1_md5_val={};
window.a_1_0_4_6_1_解析多层数据结构_测试数据=[
    {
        name: '__style',
        ch_name: '样式',
        note: "样式",
        type: "dict2",
        dict:[
      {
        name: '__edit_flag__',
        ch_name: '辅助开关',
        note: "可视化编辑模式下的一些辅助线",
        type: "bool",
        default: false,
        },
        {
          name: '__margin',
          ch_name: '外距',
          note: "外距",
          
        default: 'null',
        type: "select_eval",
        select_list_eval: [-1,24,"${(i<0)?'null':(i+'')}","${(i<0)?'null':(i*4+'px')}"]},
        {
        name: '__margin_x',
        ch_name: '外距-左右',
        note: "外距-左右",
       
        default: 'null',
        type: "select_eval",
        select_list_eval: [-1,24,"${(i<0)?'null':(i+'')}","${(i<0)?'null':(i*4+'px')}"]
        },
        {
            name: '__margin_y',
            ch_name: '外距-上下',
            note: "外距-上下",
            default: 'null',
            type: "select_eval",
            select_list_eval: [-1,24,"${(i<0)?'null':(i+'')}","${(i<0)?'null':(i*4+'px')}"]
        },
      {
        name: '__margin_left',
        ch_name: '左外距',
        note: "左外距",
       
        default: 'null',
        type: "select_eval",
        select_list_eval: [-1,24,"${(i<0)?'null':(i+'')}","${(i<0)?'null':(i*4+'px')}"]
        },
      {
        name: '__margin_right',
        ch_name: '右外距',
        note: "右外距",
       
        default: 'null',
        type: "select_eval",
        select_list_eval: [-1,24,"${(i<0)?'null':(i+'')}","${(i<0)?'null':(i*4+'px')}"]
        },
      {
        name: '__margin_top',
        ch_name: '上外距',
        note: "上外距",
       
        default: 'null',
        type: "select_eval",
        select_list_eval: [-1,24,"${(i<0)?'null':(i+'')}","${(i<0)?'null':(i*4+'px')}"]
        },
      {
        name: '__margin_bottom',
        ch_name: '下外距',
        note: "下外距",
       
        default: 'null',
        type: "select_eval",
        select_list_eval: [-1,24,"${(i<0)?'null':(i+'')}","${(i<0)?'null':(i*4+'px')}"]
        },
        {
        name: '__padding',
        ch_name: '内距',
        note: "内距",
       
        default: 'null',
        type: "select_eval",
        select_list_eval: [-1,24,"${(i<0)?'null':(i+'')}","${(i<0)?'null':(i*4+'px')}"]
        },
        {
            name: '__padding_x',
            ch_name: '内距-左右',
            note: "内距-左右",
           
        default: 'null',
        type: "select_eval",
        select_list_eval: [-1,24,"${(i<0)?'null':(i+'')}","${(i<0)?'null':(i*4+'px')}"]
        },
        {
        name: '__padding_y',
        ch_name: '内距-上下',
        note: "内距-上下",
       
        default: 'null',
        type: "select_eval",
        select_list_eval: [-1,24,"${(i<0)?'null':(i+'')}","${(i<0)?'null':(i*4+'px')}"]
        },
      {
        name: '__padding_left',
        ch_name: '左内距',
        note: "左内距",
       
        default: 'null',
        type: "select_eval",
        select_list_eval: [-1,24,"${(i<0)?'null':(i+'')}","${(i<0)?'null':(i*4+'px')}"]
        },
      {
        name: '__paddint_right',
        ch_name: '右内距',
        note: "右内距",
       
        default: 'null',
        type: "select_eval",
        select_list_eval: [-1,24,"${(i<0)?'null':(i+'')}","${(i<0)?'null':(i*4+'px')}"]
        },
      {
        name: '__padding_top',
        ch_name: '上内距',
        note: "上内距",
       
        default: 'null',
        type: "select_eval",
        select_list_eval: [-1,24,"${(i<0)?'null':(i+'')}","${(i<0)?'null':(i*4+'px')}"]
        },
      {
        name: '__padding_bottom',
        ch_name: '下内距',
        note: "下内距",
       
        default: 'null',
        type: "select_eval",
        select_list_eval: [-1,24,"${(i<0)?'null':(i+'')}","${(i<0)?'null':(i*4+'px')}"]
        },
        ]
      },
    {
        name: "size",
        ch_name: "尺寸",
        default: "medium",
        note: "尺寸",
        type: "select",
        
  select_list: ["x-small","small","medium","large","x-large"]
    },
    {
        name: "name1",
        ch_name: "标题",
        default: "后台管理系统",
        note: "顶部标题内容",
        type: "str",
    },
    {   name: "icon",
        ch_name: "图标",
        default: "icon iconfont icon-shezhi",
        note: "侧边栏展开按钮的类名",
        type: "class",
    }
    ,{
  name:'menu_data',
  note:'目录数据',
  ch_name:'目录数据',
  type:'dict',
  dict:[{
    name:"icon",
    default: '',
    note:'图标类',
    ch_name:'图标类',
    type:'class'
  },{
    name:"url",
    default: '',
    note:'路由',
    ch_name:'路由',
    type:'url'
  },{
    name:"name",
    default: '侧边栏',
    note:'侧边栏内容',
    ch_name:'侧边栏内容',
    type:'str'
  },{
    name:"test",
    note:'测试',
    ch_name:'测试',
    type:'dict',
    dict:[{
      name:"icon",
      default: '',
      note:'图标类',
      ch_name:'图标类',
      type:'class'
    }]
  },
]
}
]
window.a_1_0_4_6_1_解析多层数据结构=function(数据结构){
    console.log("开始解析多层数据结构:",数据结构)
let res={};//保存每层数据结构的类型和默认值
//path:'menu_data.name'  type:'str'  default: '' 
//path:'menu_data' type:'dict' default:{name:'',url:'',icon:'',test:{'icon:''}}
let lst=[];//待处理队列
for(let i=0;i<数据结构.length;i++){
    lst.push({path:'',data:数据结构[i]})
}
while(lst.length){
let item=lst.pop();
let path=item.path;
let data=item.data;
let father_default=item.father_default;
// if(path.split(".").length>1 && father_default){
//   if(data.type!='dict'){father_default[data.name]=data.default;}
//   else{
    
//     father_default[data.name]={};}
// }
// console.log("当前处理item:",item)
let new_path=(path.length?(path+'.'):'')+data.name;
// console.log("data",data)
res[new_path]=JSON.parse(JSON.stringify(data));
res[new_path]['key']=new_path;

if (data.type=='dict'){
  res[new_path]['default']={};
//   console.log("当前处理itemxx:",item)
//   console.log(`path.split(".").length>1 && father_default`,path.split(".").length>1 &&  (father_default!=null || father_default!=undefined))
  if(new_path.split(".").length>1 &&  father_default){father_default[data.name]=res[new_path]['default'];}
//   console.log(data)
  for(let i=0;i<data.dict.length;i++){
    lst.push({
      path:new_path,
      data:data.dict[i],
      father_default:res[new_path]['default']
    })
  }
}else if(data.type=='dict2'){
  res[new_path]['default']={};
  //   console.log("当前处理itemxx:",item)
  //   console.log(`path.split(".").length>1 && father_default`,path.split(".").length>1 &&  (father_default!=null || father_default!=undefined))
    if(new_path.split(".").length>1 &&  father_default){father_default[data.name]=res[new_path]['default'];}
  //   console.log(data)
    for(let i=0;i<data.dict.length;i++){
      lst.push({
        path:new_path,
        data:data.dict[i],
        father_default:res[new_path]['default']
      })
    }
}

else if (data.type!='dict'){
    res[new_path]['default']=data.default;
    if(new_path.split(".").length>1 && father_default){father_default[data.name]=data.default;}
  }



}
return res;
}
// window.a_1_0_4_6_1_解析多层数据结构(window.a_1_0_4_6_1_解析多层数据结构_测试数据);


window.a_1_0_4_6_1_数据_测试数据={
    name1: "后台管理系统",
    icon: "icon iconfont icon-shezhi",
    menu_data: [
        {name:'设备控制',icon:'',url:'',test:[{icon:''}]},
        {name:'用户中心',icon:'',url:'',test:[{icon:''}]},
        {name:'日志中心',icon:'',url:'',test:[{icon:''}]},
    ],
    __style:{
        __edit_flag__:true,
        __margin: 'null',
        __margin_x: 'null',
        __margin_y: 'null',
        __margin_right: 'null',
        __margin_left: 'null',
        __margin_top: 'null',
        __margin_bottom: 'null',
        __padding: 'null',
        __padding_x: 'null',
        __padding_y: 'null',
        __padding_left: 'null',
        __paddint_right: 'null',
        __padding_top: 'null',
        __padding_bottom: 'null',
    }

}
//变为

window.a_1_0_4_6_1_数据_res={
    "type": "dict",
    "dict": [
        {
            "name": "name1",
            "ch_name": "标题",
            "default": "后台管理系统",
            "note": "顶部标题内容",
            "type": "str",
            "key": "name1",
            "key2": "name1",
            "value": "后台管理系统"
        },
        {
            "name": "icon",
            "ch_name": "图标",
            "default": "icon iconfont icon-shezhi",
            "note": "侧边栏展开按钮的类名",
            "type": "class",
            "key": "icon",
            "key2": "icon",
            "value": "icon iconfont icon-shezhi"
        },
        {
            "name": "menu_data",
            "note": "目录数据",
            "ch_name": "目录数据",
            "type": "dict",
            "dict": [
                {
                    "close": true,
                    "type": "dict_item",
                    "dict": [
                        {
                            "name": "name",
                            "default": "侧边栏",
                            "note": "侧边栏内容",
                            "ch_name": "侧边栏内容",
                            "type": "str",
                            "key": "menu_data.0.name",
                            "key2": "menu_data.0.name",
                            "value": "设备控制"
                        },
                        {
                            "name": "icon",
                            "default": "",
                            "note": "图标类",
                            "ch_name": "图标类",
                            "type": "class",
                            "key": "menu_data.0.icon",
                            "key2": "menu_data.0.icon",
                            "value": ""
                        },
                        {
                            "name": "url",
                            "default": "",
                            "note": "路由",
                            "ch_name": "路由",
                            "type": "url",
                            "key": "menu_data.0.url",
                            "key2": "menu_data.0.url",
                            "value": ""
                        },
                        {
                            "name": "test",
                            "note": "测试",
                            "ch_name": "测试",
                            "type": "dict",
                            "dict": [
                                {
                                    "close": true,
                                    "type": "dict_item",
                                    "dict": [
                                        {
                                            "name": "icon",
                                            "default": "",
                                            "note": "图标类",
                                            "ch_name": "图标类",
                                            "type": "class",
                                            "key": "menu_data.0.test.0.icon",
                                            "key2": "menu_data.0.test.0.icon",
                                            "value": ""
                                        }
                                    ],
                                    "name": 0,
                                    "key": "menu_data.0.test.0",
                                    "f_data": {
                                        "name": "test",
                                        "note": "测试",
                                        "ch_name": "测试",
                                        "type": "dict",
                                        "dict": [],
                                        "key": "menu_data.0.test",
                                        "default": {
                                            "icon": ""
                                        },
                                        "key2": "menu_data.0.test",
                                        "value": "",
                                        "close": true
                                    }
                                }
                            ],
                            "key": "menu_data.0.test",
                            "default": {
                                "icon": ""
                            },
                            "key2": "menu_data.0.test",
                            "value": "",
                            "close": true
                        }
                    ],
                    "name": 0,
                    "key": "menu_data.0",
                    "f_data": {
                        "name": "menu_data",
                        "note": "目录数据",
                        "ch_name": "目录数据",
                        "type": "dict",
                        "dict": [],
                        "key": "menu_data",
                        "default": {
                            "test": {
                                "icon": ""
                            },
                            "name": "侧边栏",
                            "url": "",
                            "icon": ""
                        },
                        "key2": "menu_data",
                        "value": "",
                        "close": true
                    }
                },
                {
                    "close": true,
                    "type": "dict_item",
                    "dict": [
                        {
                            "name": "name",
                            "default": "侧边栏",
                            "note": "侧边栏内容",
                            "ch_name": "侧边栏内容",
                            "type": "str",
                            "key": "menu_data.1.name",
                            "key2": "menu_data.1.name",
                            "value": "用户中心"
                        },
                        {
                            "name": "icon",
                            "default": "",
                            "note": "图标类",
                            "ch_name": "图标类",
                            "type": "class",
                            "key": "menu_data.1.icon",
                            "key2": "menu_data.1.icon",
                            "value": ""
                        },
                        {
                            "name": "url",
                            "default": "",
                            "note": "路由",
                            "ch_name": "路由",
                            "type": "url",
                            "key": "menu_data.1.url",
                            "key2": "menu_data.1.url",
                            "value": ""
                        },
                        {
                            "name": "test",
                            "note": "测试",
                            "ch_name": "测试",
                            "type": "dict",
                            "dict": [
                                {
                                    "close": true,
                                    "type": "dict_item",
                                    "dict": [
                                        {
                                            "name": "icon",
                                            "default": "",
                                            "note": "图标类",
                                            "ch_name": "图标类",
                                            "type": "class",
                                            "key": "menu_data.1.test.0.icon",
                                            "key2": "menu_data.1.test.0.icon",
                                            "value": ""
                                        }
                                    ],
                                    "name": 0,
                                    "key": "menu_data.1.test.0",
                                    "f_data": {
                                        "name": "test",
                                        "note": "测试",
                                        "ch_name": "测试",
                                        "type": "dict",
                                        "dict": [],
                                        "key": "menu_data.1.test",
                                        "default": {
                                            "icon": ""
                                        },
                                        "key2": "menu_data.1.test",
                                        "value": "",
                                        "close": true
                                    }
                                }
                            ],
                            "key": "menu_data.1.test",
                            "default": {
                                "icon": ""
                            },
                            "key2": "menu_data.1.test",
                            "value": "",
                            "close": true
                        }
                    ],
                    "name": 1,
                    "key": "menu_data.1",
                    "f_data": {
                        "name": "menu_data",
                        "note": "目录数据",
                        "ch_name": "目录数据",
                        "type": "dict",
                        "dict": [
                            {
                                "close": true,
                                "type": "dict_item",
                                "dict": [],
                                "name": 0,
                                "key": "menu_data.0",
                                "f_data": {
                                    "name": "menu_data",
                                    "note": "目录数据",
                                    "ch_name": "目录数据",
                                    "type": "dict",
                                    "dict": [],
                                    "key": "menu_data",
                                    "default": {
                                        "test": {
                                            "icon": ""
                                        },
                                        "name": "侧边栏",
                                        "url": "",
                                        "icon": ""
                                    },
                                    "key2": "menu_data",
                                    "value": "",
                                    "close": true
                                }
                            }
                        ],
                        "key": "menu_data",
                        "default": {
                            "test": {
                                "icon": ""
                            },
                            "name": "侧边栏",
                            "url": "",
                            "icon": ""
                        },
                        "key2": "menu_data",
                        "value": "",
                        "close": true
                    }
                },
                {
                    "close": true,
                    "type": "dict_item",
                    "dict": [
                        {
                            "name": "name",
                            "default": "侧边栏",
                            "note": "侧边栏内容",
                            "ch_name": "侧边栏内容",
                            "type": "str",
                            "key": "menu_data.2.name",
                            "key2": "menu_data.2.name",
                            "value": "日志中心"
                        },
                        {
                            "name": "icon",
                            "default": "",
                            "note": "图标类",
                            "ch_name": "图标类",
                            "type": "class",
                            "key": "menu_data.2.icon",
                            "key2": "menu_data.2.icon",
                            "value": ""
                        },
                        {
                            "name": "url",
                            "default": "",
                            "note": "路由",
                            "ch_name": "路由",
                            "type": "url",
                            "key": "menu_data.2.url",
                            "key2": "menu_data.2.url",
                            "value": ""
                        },
                        {
                            "name": "test",
                            "note": "测试",
                            "ch_name": "测试",
                            "type": "dict",
                            "dict": [
                                {
                                    "close": true,
                                    "type": "dict_item",
                                    "dict": [
                                        {
                                            "name": "icon",
                                            "default": "",
                                            "note": "图标类",
                                            "ch_name": "图标类",
                                            "type": "class",
                                            "key": "menu_data.2.test.0.icon",
                                            "key2": "menu_data.2.test.0.icon",
                                            "value": ""
                                        }
                                    ],
                                    "name": 0,
                                    "key": "menu_data.2.test.0",
                                    "f_data": {
                                        "name": "test",
                                        "note": "测试",
                                        "ch_name": "测试",
                                        "type": "dict",
                                        "dict": [],
                                        "key": "menu_data.2.test",
                                        "default": {
                                            "icon": ""
                                        },
                                        "key2": "menu_data.2.test",
                                        "value": "",
                                        "close": true
                                    }
                                }
                            ],
                            "key": "menu_data.2.test",
                            "default": {
                                "icon": ""
                            },
                            "key2": "menu_data.2.test",
                            "value": "",
                            "close": true
                        }
                    ],
                    "name": 2,
                    "key": "menu_data.2",
                    "f_data": {
                        "name": "menu_data",
                        "note": "目录数据",
                        "ch_name": "目录数据",
                        "type": "dict",
                        "dict": [
                            {
                                "close": true,
                                "type": "dict_item",
                                "dict": [],
                                "name": 0,
                                "key": "menu_data.0",
                                "f_data": {
                                    "name": "menu_data",
                                    "note": "目录数据",
                                    "ch_name": "目录数据",
                                    "type": "dict",
                                    "dict": [],
                                    "key": "menu_data",
                                    "default": {
                                        "test": {
                                            "icon": ""
                                        },
                                        "name": "侧边栏",
                                        "url": "",
                                        "icon": ""
                                    },
                                    "key2": "menu_data",
                                    "value": "",
                                    "close": true
                                }
                            },
                            {
                                "close": true,
                                "type": "dict_item",
                                "dict": [],
                                "name": 1,
                                "key": "menu_data.1",
                                "f_data": {
                                    "name": "menu_data",
                                    "note": "目录数据",
                                    "ch_name": "目录数据",
                                    "type": "dict",
                                    "dict": [
                                        {
                                            "close": true,
                                            "type": "dict_item",
                                            "dict": [],
                                            "name": 0,
                                            "key": "menu_data.0",
                                            "f_data": {
                                                "name": "menu_data",
                                                "note": "目录数据",
                                                "ch_name": "目录数据",
                                                "type": "dict",
                                                "dict": [],
                                                "key": "menu_data",
                                                "default": {
                                                    "test": {
                                                        "icon": ""
                                                    },
                                                    "name": "侧边栏",
                                                    "url": "",
                                                    "icon": ""
                                                },
                                                "key2": "menu_data",
                                                "value": "",
                                                "close": true
                                            }
                                        }
                                    ],
                                    "key": "menu_data",
                                    "default": {
                                        "test": {
                                            "icon": ""
                                        },
                                        "name": "侧边栏",
                                        "url": "",
                                        "icon": ""
                                    },
                                    "key2": "menu_data",
                                    "value": "",
                                    "close": true
                                }
                            }
                        ],
                        "key": "menu_data",
                        "default": {
                            "test": {
                                "icon": ""
                            },
                            "name": "侧边栏",
                            "url": "",
                            "icon": ""
                        },
                        "key2": "menu_data",
                        "value": "",
                        "close": true
                    }
                }
            ],
            "key": "menu_data",
            "default": {
                "test": {
                    "icon": ""
                },
                "name": "侧边栏",
                "url": "",
                "icon": ""
            },
            "key2": "menu_data",
            "value": "",
            "close": true
        },
        {
            "name": "__style",
            "ch_name": "样式",
            "note": "样式",
            "type": "dict2",
            "dict": [
                {
                    "name": "__edit_flag__",
                    "ch_name": "辅助开关",
                    "note": "可视化编辑模式下的一些辅助线",
                    "type": "bool",
                    "default": false,
                    "key": "__style.__edit_flag__",
                    "key2": "__style.__edit_flag__",
                    "组件属性路径": "__edit_flag__",
                    "value": true
                },
                {
                    "name": "__margin",
                    "ch_name": "外距",
                    "note": "外距",
                    "type": "select",
                    "default": "741",
                    "select_list": [
                        [
                            "741",
                            "no"
                        ],
                        [
                            "0",
                            "0px"
                        ],
                        [
                            "1",
                            "4px"
                        ],
                        [
                            "2",
                            "8px"
                        ],
                        [
                            "3",
                            "12px"
                        ],
                        [
                            "4",
                            "16px"
                        ],
                        [
                            "5",
                            "20px"
                        ],
                        [
                            "6",
                            "24px"
                        ],
                        [
                            "7",
                            "28px"
                        ],
                        [
                            "8",
                            "32px"
                        ],
                        [
                            "9",
                            "36px"
                        ],
                        [
                            "10",
                            "40px"
                        ],
                        [
                            "11",
                            "44px"
                        ],
                        [
                            "12",
                            "48px"
                        ]
                    ],
                    "key": "__style.__margin",
                    "key2": "__style.__margin",
                    "组件属性路径": "__margin",
                    "value": "null"
                },
                {
                    "name": "__margin_x",
                    "ch_name": "外距-左右",
                    "note": "外距-左右",
                    "type": "select",
                    "default": "741",
                    "select_list": [
                        [
                            "741",
                            "no"
                        ],
                        [
                            "0",
                            "0px"
                        ],
                        [
                            "1",
                            "4px"
                        ],
                        [
                            "2",
                            "8px"
                        ],
                        [
                            "3",
                            "12px"
                        ],
                        [
                            "4",
                            "16px"
                        ],
                        [
                            "5",
                            "20px"
                        ],
                        [
                            "6",
                            "24px"
                        ],
                        [
                            "7",
                            "28px"
                        ],
                        [
                            "8",
                            "32px"
                        ],
                        [
                            "9",
                            "36px"
                        ],
                        [
                            "10",
                            "40px"
                        ],
                        [
                            "11",
                            "44px"
                        ],
                        [
                            "12",
                            "48px"
                        ]
                    ],
                    "key": "__style.__margin_x",
                    "key2": "__style.__margin_x",
                    "组件属性路径": "__margin_x",
                    "value": "null"
                },
                {
                    "name": "__margin_y",
                    "ch_name": "外距-上下",
                    "note": "外距-上下",
                    "type": "select",
                    "default": "741",
                    "select_list": [
                        [
                            "741",
                            "no"
                        ],
                        [
                            "0",
                            "0px"
                        ],
                        [
                            "1",
                            "4px"
                        ],
                        [
                            "2",
                            "8px"
                        ],
                        [
                            "3",
                            "12px"
                        ],
                        [
                            "4",
                            "16px"
                        ],
                        [
                            "5",
                            "20px"
                        ],
                        [
                            "6",
                            "24px"
                        ],
                        [
                            "7",
                            "28px"
                        ],
                        [
                            "8",
                            "32px"
                        ],
                        [
                            "9",
                            "36px"
                        ],
                        [
                            "10",
                            "40px"
                        ],
                        [
                            "11",
                            "44px"
                        ],
                        [
                            "12",
                            "48px"
                        ]
                    ],
                    "key": "__style.__margin_y",
                    "key2": "__style.__margin_y",
                    "组件属性路径": "__margin_y",
                    "value": "null"
                },
                {
                    "name": "__margin_right",
                    "ch_name": "右外距",
                    "note": "右外距",
                    "type": "select",
                    "default": "741",
                    "select_list": [
                        [
                            "741",
                            "no"
                        ],
                        [
                            "0",
                            "0px"
                        ],
                        [
                            "1",
                            "4px"
                        ],
                        [
                            "2",
                            "8px"
                        ],
                        [
                            "3",
                            "12px"
                        ],
                        [
                            "4",
                            "16px"
                        ],
                        [
                            "5",
                            "20px"
                        ],
                        [
                            "6",
                            "24px"
                        ],
                        [
                            "7",
                            "28px"
                        ],
                        [
                            "8",
                            "32px"
                        ],
                        [
                            "9",
                            "36px"
                        ],
                        [
                            "10",
                            "40px"
                        ],
                        [
                            "11",
                            "44px"
                        ],
                        [
                            "12",
                            "48px"
                        ]
                    ],
                    "key": "__style.__margin_right",
                    "key2": "__style.__margin_right",
                    "组件属性路径": "__margin_right",
                    "value": "null"
                },
                {
                    "name": "__margin_left",
                    "ch_name": "左外距",
                    "note": "左外距",
                    "type": "select",
                    "default": "741",
                    "select_list": [
                        [
                            "741",
                            "no"
                        ],
                        [
                            "0",
                            "0px"
                        ],
                        [
                            "1",
                            "4px"
                        ],
                        [
                            "2",
                            "8px"
                        ],
                        [
                            "3",
                            "12px"
                        ],
                        [
                            "4",
                            "16px"
                        ],
                        [
                            "5",
                            "20px"
                        ],
                        [
                            "6",
                            "24px"
                        ],
                        [
                            "7",
                            "28px"
                        ],
                        [
                            "8",
                            "32px"
                        ],
                        [
                            "9",
                            "36px"
                        ],
                        [
                            "10",
                            "40px"
                        ],
                        [
                            "11",
                            "44px"
                        ],
                        [
                            "12",
                            "48px"
                        ]
                    ],
                    "key": "__style.__margin_left",
                    "key2": "__style.__margin_left",
                    "组件属性路径": "__margin_left",
                    "value": "null"
                },
                {
                    "name": "__margin_top",
                    "ch_name": "上外距",
                    "note": "上外距",
                    "type": "select",
                    "default": "741",
                    "select_list": [
                        [
                            "741",
                            "no"
                        ],
                        [
                            "0",
                            "0px"
                        ],
                        [
                            "1",
                            "4px"
                        ],
                        [
                            "2",
                            "8px"
                        ],
                        [
                            "3",
                            "12px"
                        ],
                        [
                            "4",
                            "16px"
                        ],
                        [
                            "5",
                            "20px"
                        ],
                        [
                            "6",
                            "24px"
                        ],
                        [
                            "7",
                            "28px"
                        ],
                        [
                            "8",
                            "32px"
                        ],
                        [
                            "9",
                            "36px"
                        ],
                        [
                            "10",
                            "40px"
                        ],
                        [
                            "11",
                            "44px"
                        ],
                        [
                            "12",
                            "48px"
                        ]
                    ],
                    "key": "__style.__margin_top",
                    "key2": "__style.__margin_top",
                    "组件属性路径": "__margin_top",
                    "value": "null"
                },
                {
                    "name": "__margin_bottom",
                    "ch_name": "下外距",
                    "note": "下外距",
                    "type": "select",
                    "default": "741",
                    "select_list": [
                        [
                            "741",
                            "no"
                        ],
                        [
                            "0",
                            "0px"
                        ],
                        [
                            "1",
                            "4px"
                        ],
                        [
                            "2",
                            "8px"
                        ],
                        [
                            "3",
                            "12px"
                        ],
                        [
                            "4",
                            "16px"
                        ],
                        [
                            "5",
                            "20px"
                        ],
                        [
                            "6",
                            "24px"
                        ],
                        [
                            "7",
                            "28px"
                        ],
                        [
                            "8",
                            "32px"
                        ],
                        [
                            "9",
                            "36px"
                        ],
                        [
                            "10",
                            "40px"
                        ],
                        [
                            "11",
                            "44px"
                        ],
                        [
                            "12",
                            "48px"
                        ]
                    ],
                    "key": "__style.__margin_bottom",
                    "key2": "__style.__margin_bottom",
                    "组件属性路径": "__margin_bottom",
                    "value": "null"
                },
                {
                    "name": "__padding",
                    "ch_name": "内距",
                    "note": "内距",
                    "type": "select",
                    "default": "741",
                    "select_list": [
                        [
                            "741",
                            "no"
                        ],
                        [
                            "0",
                            "0px"
                        ],
                        [
                            "1",
                            "4px"
                        ],
                        [
                            "2",
                            "8px"
                        ],
                        [
                            "3",
                            "12px"
                        ],
                        [
                            "4",
                            "16px"
                        ],
                        [
                            "5",
                            "20px"
                        ],
                        [
                            "6",
                            "24px"
                        ],
                        [
                            "7",
                            "28px"
                        ],
                        [
                            "8",
                            "32px"
                        ],
                        [
                            "9",
                            "36px"
                        ],
                        [
                            "10",
                            "40px"
                        ],
                        [
                            "11",
                            "44px"
                        ],
                        [
                            "12",
                            "48px"
                        ]
                    ],
                    "key": "__style.__padding",
                    "key2": "__style.__padding",
                    "组件属性路径": "__padding",
                    "value": "null"
                },
                {
                    "name": "__padding_x",
                    "ch_name": "内距-左右",
                    "note": "内距-左右",
                    "type": "select",
                    "default": "741",
                    "select_list": [
                        [
                            "741",
                            "no"
                        ],
                        [
                            "0",
                            "0px"
                        ],
                        [
                            "1",
                            "4px"
                        ],
                        [
                            "2",
                            "8px"
                        ],
                        [
                            "3",
                            "12px"
                        ],
                        [
                            "4",
                            "16px"
                        ],
                        [
                            "5",
                            "20px"
                        ],
                        [
                            "6",
                            "24px"
                        ],
                        [
                            "7",
                            "28px"
                        ],
                        [
                            "8",
                            "32px"
                        ],
                        [
                            "9",
                            "36px"
                        ],
                        [
                            "10",
                            "40px"
                        ],
                        [
                            "11",
                            "44px"
                        ],
                        [
                            "12",
                            "48px"
                        ]
                    ],
                    "key": "__style.__padding_x",
                    "key2": "__style.__padding_x",
                    "组件属性路径": "__padding_x",
                    "value": "null"
                },
                {
                    "name": "__padding_y",
                    "ch_name": "内距-上下",
                    "note": "内距-上下",
                    "type": "select",
                    "default": "741",
                    "select_list": [
                        [
                            "741",
                            "no"
                        ],
                        [
                            "0",
                            "0px"
                        ],
                        [
                            "1",
                            "4px"
                        ],
                        [
                            "2",
                            "8px"
                        ],
                        [
                            "3",
                            "12px"
                        ],
                        [
                            "4",
                            "16px"
                        ],
                        [
                            "5",
                            "20px"
                        ],
                        [
                            "6",
                            "24px"
                        ],
                        [
                            "7",
                            "28px"
                        ],
                        [
                            "8",
                            "32px"
                        ],
                        [
                            "9",
                            "36px"
                        ],
                        [
                            "10",
                            "40px"
                        ],
                        [
                            "11",
                            "44px"
                        ],
                        [
                            "12",
                            "48px"
                        ]
                    ],
                    "key": "__style.__padding_y",
                    "key2": "__style.__padding_y",
                    "组件属性路径": "__padding_y",
                    "value": "null"
                },
                {
                    "name": "__padding_left",
                    "ch_name": "左内距",
                    "note": "左内距",
                    "type": "select",
                    "default": "741",
                    "select_list": [
                        [
                            "741",
                            "no"
                        ],
                        [
                            "0",
                            "0px"
                        ],
                        [
                            "1",
                            "4px"
                        ],
                        [
                            "2",
                            "8px"
                        ],
                        [
                            "3",
                            "12px"
                        ],
                        [
                            "4",
                            "16px"
                        ],
                        [
                            "5",
                            "20px"
                        ],
                        [
                            "6",
                            "24px"
                        ],
                        [
                            "7",
                            "28px"
                        ],
                        [
                            "8",
                            "32px"
                        ],
                        [
                            "9",
                            "36px"
                        ],
                        [
                            "10",
                            "40px"
                        ],
                        [
                            "11",
                            "44px"
                        ],
                        [
                            "12",
                            "48px"
                        ]
                    ],
                    "key": "__style.__padding_left",
                    "key2": "__style.__padding_left",
                    "组件属性路径": "__padding_left",
                    "value": "null"
                },
                {
                    "name": "__paddint_right",
                    "ch_name": "右内距",
                    "note": "右内距",
                    "type": "select",
                    "default": "741",
                    "select_list": [
                        [
                            "741",
                            "no"
                        ],
                        [
                            "0",
                            "0px"
                        ],
                        [
                            "1",
                            "4px"
                        ],
                        [
                            "2",
                            "8px"
                        ],
                        [
                            "3",
                            "12px"
                        ],
                        [
                            "4",
                            "16px"
                        ],
                        [
                            "5",
                            "20px"
                        ],
                        [
                            "6",
                            "24px"
                        ],
                        [
                            "7",
                            "28px"
                        ],
                        [
                            "8",
                            "32px"
                        ],
                        [
                            "9",
                            "36px"
                        ],
                        [
                            "10",
                            "40px"
                        ],
                        [
                            "11",
                            "44px"
                        ],
                        [
                            "12",
                            "48px"
                        ]
                    ],
                    "key": "__style.__paddint_right",
                    "key2": "__style.__paddint_right",
                    "组件属性路径": "__paddint_right",
                    "value": "null"
                },
                {
                    "name": "__padding_top",
                    "ch_name": "上内距",
                    "note": "上内距",
                    "type": "select",
                    "default": "741",
                    "select_list": [
                        [
                            "741",
                            "no"
                        ],
                        [
                            "0",
                            "0px"
                        ],
                        [
                            "1",
                            "4px"
                        ],
                        [
                            "2",
                            "8px"
                        ],
                        [
                            "3",
                            "12px"
                        ],
                        [
                            "4",
                            "16px"
                        ],
                        [
                            "5",
                            "20px"
                        ],
                        [
                            "6",
                            "24px"
                        ],
                        [
                            "7",
                            "28px"
                        ],
                        [
                            "8",
                            "32px"
                        ],
                        [
                            "9",
                            "36px"
                        ],
                        [
                            "10",
                            "40px"
                        ],
                        [
                            "11",
                            "44px"
                        ],
                        [
                            "12",
                            "48px"
                        ]
                    ],
                    "key": "__style.__padding_top",
                    "key2": "__style.__padding_top",
                    "组件属性路径": "__padding_top",
                    "value": "null"
                },
                {
                    "name": "__padding_bottom",
                    "ch_name": "下内距",
                    "note": "下内距",
                    "type": "select",
                    "default": "741",
                    "select_list": [
                        [
                            "741",
                            "no"
                        ],
                        [
                            "0",
                            "0px"
                        ],
                        [
                            "1",
                            "4px"
                        ],
                        [
                            "2",
                            "8px"
                        ],
                        [
                            "3",
                            "12px"
                        ],
                        [
                            "4",
                            "16px"
                        ],
                        [
                            "5",
                            "20px"
                        ],
                        [
                            "6",
                            "24px"
                        ],
                        [
                            "7",
                            "28px"
                        ],
                        [
                            "8",
                            "32px"
                        ],
                        [
                            "9",
                            "36px"
                        ],
                        [
                            "10",
                            "40px"
                        ],
                        [
                            "11",
                            "44px"
                        ],
                        [
                            "12",
                            "48px"
                        ]
                    ],
                    "key": "__style.__padding_bottom",
                    "key2": "__style.__padding_bottom",
                    "组件属性路径": "__padding_bottom",
                    "value": "null"
                }
            ],
            "key": "__style",
            "default": {
                "__padding_bottom": "741",
                "__padding_top": "741",
                "__paddint_right": "741",
                "__padding_left": "741",
                "__padding_y": "741",
                "__padding_x": "741",
                "__padding": "741",
                "__margin_bottom": "741",
                "__margin_top": "741",
                "__margin_right": "741",
                "__margin_left": "741",
                "__margin_y": "741",
                "__margin_x": "741",
                "__margin": "741",
                "__edit_flag__": false
            },
            "key2": "__style",
            "value": "",
            "close": true
        }
    ],
    "close": false
}
window.a_1_0_4_6_1_解析数据=function(数据,结构数据){
let dict_item={close:true,type:'dict_item',dict:[]}
let res={"type":"dict",dict:[],close:false};
let lst=[{path:'',结构路径:'',data:数据,father_data:res}];
// let count=0;
while(lst.length){
    // count++;
    // console.log("count:",count)
    let item=lst.pop();
    let path=item.path;
    let data=item.data;
    let 结构路径=item.结构路径;
    let father_data=item.father_data;
    //如果是 数组格式
    if (Array.isArray(data)){
        // console.time('数组数据处理耗时');
        let father_dict=father_data.dict;
        let k=null;
        if(item.type=="dict2"){
            for(let i=0;i<data.length;i++){
                k=path+'.'+i;
                father_dict.push({close:true,type:'dict_item',dict:[],name:i,key:k});
                lst.push({path:k,结构路径:结构路径,data:data[i],father_data:father_dict[i],type:"dict2_item"})
            }
        }
        else if(item.type=="dict"){
            for(let i=0;i<data.length;i++){
                k=path+'.'+i;
                father_dict.push({close:true,type:'dict_item',dict:[],name:i,key:k});
                lst.push({path:k,结构路径:结构路径,data:data[i],father_data:father_dict[i]})
            }
        }
        // console.timeEnd('数组数据处理耗时');
    }else{
        // console.time('字典数据处理耗时');
    //字典格式
    for(let key in data){
        let new_path=null;
        if(path==''){new_path=key}
        else{new_path=path+'.'+key;}

        
        let new_结构路径=null;
        if(path==''){new_结构路径=key}
        else{new_结构路径=结构路径+'.'+key;}
        let val=null;
        try{
            val=JSON.parse(JSON.stringify(结构数据[new_结构路径]));
        }catch{
            // console.log("结构数据",结构数据)
            // console.log("new_结构路径",new_结构路径)
            // console.log("item",item)
            // console.log("key",key)
            val=JSON.parse(JSON.stringify(结构数据[key]));
        }
        val.name=key;
        val.key=new_path;
        val.key2=new_path;
        if(item.type=="dict2"){
            // console.log("set_组件属性路径")
            let 结构_lst=结构路径.split(".");
            // console.log("结构lst",结构_lst)
            for (let i=0;i<结构_lst.length-1;i++){
                if(val.组件属性路径){
                    val.组件属性路径=val.组件属性路径+'.'+结构_lst[i];
                }else{
                    val.组件属性路径=结构_lst[i];
                }
            }
            
            if(val.组件属性路径){
                val.组件属性路径=val.组件属性路径+'.'+key;
            }else{
                val.组件属性路径=key;
            }
        }
        // console.log(item)
        // console.log("\t",val)
        father_data.dict.push(val);
        if(val.type=='dict'){
            val.value='';
            val.close=true;
            val.dict=[];
            lst.push({path:new_path,结构路径:new_结构路径,data:data[key],father_data:val,type:"dict"})
        }else if(val.type=='dict2'){
            
            val.value='';
            val.close=true;
            val.dict=[];
            lst.push({path:new_path,结构路径:new_结构路径,data:data[key],father_data:val,type:"dict2"})
        }
        
        else{
            
        val.value=data[key];
        }
    }
    // console.log("data:",data)
    // console.timeEnd('字典数据处理耗时');
    }
}
return res;
}
//  console.log("待解析的数据结构:",a_1_0_4_6_1_解析多层数据结构_测试数据)
//  res1=window.a_1_0_4_6_1_解析多层数据结构(window.a_1_0_4_6_1_解析多层数据结构_测试数据);
//  console.log("解析后的 数据结构:",res1)
//  console.log("待解析的数据:",a_1_0_4_6_1_数据_测试数据)
//  res2=window.a_1_0_4_6_1_解析数据(window.a_1_0_4_6_1_数据_测试数据,res1);
//  console.log("解析后的 数据:",res2)

//修改属性
window.a_1_0_4_6_1_update_val=function(_this){
        let val=_this.data.value;
        
        let change_data={};
        let k_lst=_this.data.key.split(".");
        let key1=null;key2=null;
        if (k_lst.length==1){
            key1="";
            key2=_this.data.key;
        }else{
            key1="."+(k_lst.slice(0, -1)).join('.');
            key2=k_lst[k_lst.length-1];
        }
        change_data[key2]=val;
        update_val={
            "type":"change_data",
            "type2":"更新前端组件属性",
            'page_id':_this.data.father_data.page_id,//页面id
            'temp_id':_this.data.father_data.temp_id,//组件id
            "key":_this.data.key,
            "key1":key1,
            "组件属性路径":_this.data.组件属性路径,
            "key2":key2,
            "value":val,
            'now_select':_this.now_select,
            "path":"page_config.dict.1",
            "data_type":"set_list",//类型 修改数据
            "postput":[
              {
                'path':`page_config.dict.1.dict.${_this.data.father_data.page_id}.dict.1.page_dict.${_this.data.father_data.temp_id}.base_info.data${key1}`,
                'data':change_data
              }],
          }


        let temp_key1=null,temp_key2=null,temp_id2=null;
        //判断是否是属性容器 可以容纳子节点属性的容器
        if(_this.data.key.startsWith("__father_data")){
            let change_data2={'path':'',data:''};
            let change_data={};
            change_data2.data=change_data;
            update_val.postput.push(change_data2);
            let temp_data=_this.data.key.split(".")[1].split("_");
            temp_id2=temp_data[temp_data.length-1];
            let temp_key=_this.data.key.split(".").slice(2).join(".");
            k_lst=temp_key.split(".");
            if (k_lst.length==1){
                temp_key1="";
                temp_key2=temp_key;
            }else{
                temp_key1="."+(k_lst.slice(0, -1)).join('.');
                temp_key2=k_lst[k_lst.length-1];
            }
            change_data[temp_key2]=val;
            change_data2.path=`page_config.dict.1.dict.${_this.data.father_data.page_id}.dict.1.page_dict.${temp_id2}.base_info.data${temp_key1}`;
            //要更新的子容器的属性
            update_val.temp2={
                key1:temp_key1,
                key2:temp_key2,
                temp_id:temp_id2
            }
        }
        _this.data.father_data.全局配置对象.更新(update_val);
    
}
//添加项
window.a_1_0_4_6_1_update_add_item=function(_this){
        /*console.log("开始刷新目录");*/
                // _this.data.刷新目录1();
                let path_before2=`page_config.dict.1.dict.${_this.data.father_data.page_id}.dict.1.page_dict.${_this.data.father_data.temp_id}.base_info.data.${_this.data.key.split(".")[0]}`
                let path_before=`page_config.dict.1.dict.${_this.data.father_data.page_id}.dict.1.page_dict.${_this.data.father_data.temp_id}.base_info.data.${_this.data.key}`
                console.log("添加前端组件属性_新增项path_before",path_before)
                let obj=_this.data.father_data.全局配置对象.update_obj.data;
                window.tt=_this;
                console.log(tt)
                let path_lst=path_before.split(".");
                for(let i=0;i<path_lst.length;i++){
                    obj=obj[path_lst[i]];
                }
                let add_idx=obj.length;
        
                let update_val={
                  "type":"change_data",
                  "type2":"添加前端组件属性_新增项",
                  'page_id':_this.data.father_data.page_id,//页面id
                  'temp_id':_this.data.father_data.temp_id,//组件id
                  "key":_this.data.key,
                  "path_before":path_before2,
                  "path":"page_config.dict.1",
                  "data_type":"set_list",//类型 修改数据
                  "postput":[
                    {
                      'path':path_before+'.'+add_idx,
                      'data':JSON.parse(JSON.stringify(_this.data.default))
                    }],
                }


                
                //判断是否是属性容器 可以容纳子节点属性的容器
                if(_this.data.key.startsWith("__father_data")){
                    let temp_data=_this.data.key.split(".")[1].split("_");
                    let temp_id2=temp_data[temp_data.length-1];
                    let temp_key=_this.data.key.split(".").slice(2).join(".");





                    let path_before2=`page_config.dict.1.dict.${_this.data.father_data.page_id}.dict.1.page_dict.${temp_id2}.base_info.data.${temp_key.split(".")[0]}`;
                    let path_before=`page_config.dict.1.dict.${_this.data.father_data.page_id}.dict.1.page_dict.${temp_id2}.base_info.data.${temp_key}`;
                    //要更新的子容器的属性
                    update_val.temp2={
                        key:temp_key,
                        path_before:path_before2,
                        temp_id:temp_id2
                    }
                    update_val.postput.push({
                        'path':path_before+'.'+add_idx,
                        'data':JSON.parse(JSON.stringify(_this.data.default))});
                }
                _this.data.father_data.全局配置对象.更新(update_val);
}
//删除项
window.a_1_0_4_6_1_update_del_item=function(_this){

    let path_before=`page_config.dict.1.dict.${_this.data.father_data.page_id}.dict.1.page_dict.${_this.data.father_data.temp_id}.base_info.data.${_this.data.key}`
    let update_val={
      "type":"change_data",
      "type2":"添加前端组件属性_删除项",
      'page_id':_this.data.father_data.page_id,//页面id
      'temp_id':_this.data.father_data.temp_id,//组件id
      "key":_this.data.key,
      "path_before":path_before,
      "path":"page_config.dict.1",
      "data_type":"set_list",//类型 修改数据
      "delete":[
        {
          'path':path_before,
        }],
    }
    //判断是否是属性容器 可以容纳子节点属性的容器
    if(_this.data.key.startsWith("__father_data")){
            
        let temp_data=_this.data.key.split(".")[1].split("_");
        let temp_id2=temp_data[temp_data.length-1];
        
        let temp_key=_this.data.key.split(".").slice(2).join(".");
    let path_before=`page_config.dict.1.dict.${_this.data.father_data.page_id}.dict.1.page_dict.${temp_key}.base_info.data.${temp_key}`
            //要更新的子容器的属性
            update_val.temp2={
                key:temp_key,
                path_before:path_before,
                temp_id:temp_id2
            }
            update_val.delete.push({"path":path_before});
    }
    _this.data.father_data.全局配置对象.更新(update_val);  
}


//str 列
Vue.component2('a_1_0_4_6_1_select_line', {
    template: `
        <div :class="{ 'a_1_0_4_6_1_lines test': data.true, 'a_1_0_4_6_1_lines_onclick': data.onclick_flag }" v-show="show_flag">
        <span class="a_1_0_4_6_1_hid_line":style="'padding-left: '+data._space_+'px;'"></span>
        <span  class="icon iconfont icon-str" style="color: #ff7400;"></span>
        
        <span style="color:#bcbcbc">{{data.ch_name}}[{{data.name}}]</span>

        
    <div style="display:inline-block;flex:1;"><div style="display:flex;justify-content: flex-end;display: flex;">
    

    <select v-model="data.value"  class="a_1_0_4_6_1_right a_1_0_4_6_1_input_css" @change="updateProperty">
          <option v-for="item in data.select_list" :value="item[0]" :key="item[0]">
                {{ item[1] }}
            </option>
    </select>


    </div></div>
        </div>
  `,
  data(){
    return{
        show_flag:true,
        data:{
            onclick_flag:false,
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            false:false,
            close:true,
            name:"",
            ch_name:'',
            _space_:0,
            value:'false',
            value_init:false,
            select_list: [
                ['false','False'],
                ['true','True']
              ]
        }
    }
  },
  methods:{
    updateProperty:function(event){
        a_1_0_4_6_1_update_val(this);
    },
    handle_click:function(event){
        //点击当前 高亮显示
        try{
            console.log("高亮",this.data.path);
            this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
        if (this.data.click){
            try{
                this.data.click(event)
                
                // console.log("start click2")
            }
            catch{}
            return 
        }
        if (this.data.click_obj){
            try{
                lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
            
                // console.log("start click3")
            }
            catch{}
            return 
        }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    }
  },
  mounted:function(){
    if(_this.deepcopy_data.value=='false'){
        this.data.value_init=true;
    }
    try{
        _this.data.select_list=JSON.parse(JSON.stringify(_this.data.father_data2.解析后的数据结构[_this.data.key2].select_list));

    }catch{}
    
  }

})
Vue.component2('a_1_0_4_6_1_select_eval_line', {
    template: `
        <div :class="{ 'a_1_0_4_6_1_lines test': data.true, 'a_1_0_4_6_1_lines_onclick': data.onclick_flag }" v-show="show_flag">
        <span class="a_1_0_4_6_1_hid_line":style="'padding-left: '+data._space_+'px;'"></span>
        <span  class="icon iconfont icon-str" style="color: #ff7400;"></span>
        
        <span style="color:#bcbcbc">{{data.ch_name}}[{{data.name}}]</span>

        
    <div style="display:inline-block;flex:1;"><div style="display:flex;justify-content: flex-end;display: flex;">
    

    <select v-model="data.value"  class="a_1_0_4_6_1_right a_1_0_4_6_1_input_css" @change="updateProperty">
          <option v-for="item in data.select_list" :value="item[0]" :key="item[0]">
                {{ item[1] }}
            </option>
    </select>


    </div></div>
        </div>
  `,
  data(){
    return{
        show_flag:true,
        data:{
            onclick_flag:false,
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            false:false,
            close:true,
            name:"",
            ch_name:'',
            _space_:0,
            value:'false',
            value_init:false,
            select_list: [
                ['false','False'],
                ['true','True']
              ],
            select_list_eval:[0,24,"${i+''}","${0.5+i*0.25}rem"],
        }
    }
  },
  methods:{
    updateProperty:function(event){
        a_1_0_4_6_1_update_val(this);
    },
    handle_click:function(event){
        //点击当前 高亮显示
        try{
            console.log("高亮",this.data.path);
            this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
        if (this.data.click){
            try{
                this.data.click(event)
                
                // console.log("start click2")
            }
            catch{}
            return 
        }
        if (this.data.click_obj){
            try{
                lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
            
                // console.log("start click3")
            }
            catch{}
            return 
        }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    },
    replaceEvalExpressions:function(str, context) {
        // 创建一个正则表达式，全局匹配所有的${}表达式
        const regex = /\$\{([^}]+)\}/g;
        // 使用一个函数作为replace方法的第二个参数，以便对每个匹配项进行处理
        return str.replace(regex, (match, expr) => {
            // 如果提供了context对象，则尝试在其中查找变量；否则，使用全局作用域
            const scope = context || window;
            with (scope){return eval(expr)}
        });
    }
  },
  mounted:function(){
    if(_this.deepcopy_data.value=='false'){
        this.data.value_init=true;
    }
    try{
        _this.data.select_list_eval=JSON.parse(JSON.stringify(_this.deepcopy_data.father_data2.解析后的数据结构[_this.deepcopy_data.key2].select_list_eval));
        let select_list=[];
        for(let i=_this.data.select_list_eval[0];i<=_this.data.select_list_eval[1];i++){
            select_list.push([_this.replaceEvalExpressions(_this.data.select_list_eval[2],{i:i}),_this.replaceEvalExpressions(_this.data.select_list_eval[3],{i:i})]);
        }
        _this.$set(_this.data,"select_list",select_list);
    }catch (err){
        // console.log("select_eval_err:",err,"data:",JSON.parse(JSON.stringify(_this.data)))
        // console.log(_this.data.father_data2.解析后的数据结构)

    }
    
  }

})

//str 列
Vue.component2('a_1_0_4_6_1_select_eval_color_line_item', {  
    template: `
<div class="select3_____sub_menu_item" @click="click">
    {{data.text}}<div class="a_1_0_4_6_1_box" :style="{ backgroundColor: data.value }"></div>
</div>
  `,  
  data(){  
  
    return {  
        data:{
            __key__:"1",
            text:"line",
            callback:null,
        }
        
        
    }    
  
  },
    methods: {  
        click(){
            try{
                this.data.callback(this.data.__key__)
            }catch{}
          },
    },  
    
  mounted:function(){
    _this.data.callback=_this.deepcopy_data.callback;
    }
  } 
  );
  
Vue.component2('a_1_0_4_6_1_select_eval_color_line', {
    template: `
        <div :class="{ 'a_1_0_4_6_1_lines test': data.true, 'a_1_0_4_6_1_lines_onclick': data.onclick_flag }" v-show="show_flag">
        <span class="a_1_0_4_6_1_hid_line":style="'padding-left: '+data._space_+'px;'"></span>
        <span  class="icon iconfont icon-str" style="color: #ff7400;"></span>
        
        <span style="color:#bcbcbc">{{data.ch_name}}[{{data.name}}]</span>

        
    <div style="display:inline-block;flex:1;"><div style="display:flex;justify-content: flex-end;display: flex;">
    

    <input   @input="updateProperty($event.target.value)"   type="text" class="a_1_0_4_6_1_right a_1_0_4_6_1_input_css"  v-model="data.value">
    <div class="a_1_0_4_6_1_box" :style="{ backgroundColor: data.value }"></div>
    <div class="a_1_0_4_6_1_color-select" @click="toggleDropdown">
      <span>▼</span>
    </div>







    </div></div>
        </div>
  `,
  data(){
    return{
        dropdownActive: false,
        show_flag:true,
        data:{
            onclick_flag:false,
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            false:false,
            close:true,
            name:"",
            ch_name:'',
            _space_:0,
            value:'false',
            value_init:false,
            select_list: [
                ['false','False'],['true','True']
              ]
        }
    }
  },
  watch:{
  },
  methods:{
    
    replaceEvalExpressions:function(str, context) {
        // 创建一个正则表达式，全局匹配所有的${}表达式
        const regex = /\$\{([^}]+)\}/g;
        // 使用一个函数作为replace方法的第二个参数，以便对每个匹配项进行处理
        return str.replace(regex, (match, expr) => {
            // 如果提供了context对象，则尝试在其中查找变量；否则，使用全局作用域
            const scope = context || window;
            with (scope){return eval(expr)}
        });
    },
    toggleDropdown(event) {
        
        let menu_data=[];
        for(let i=0;i<this.data.select_list.length;i++){
            menu_data.push({text:this.data.select_list[i][1],value:this.data.select_list[i][0]});
        }
  window.select3__({
    event:event,add_xy:{y:0,x:-100},menu_data:menu_data,vue_name:"a_1_0_4_6_1_select_eval_color_line_item",callback:this.selectColor
  })
    },
    selectColor(idx) {
      this.data.value = this.data.select_list[idx][0];
      this.updateProperty();
    },
    updateProperty:function(event){
        a_1_0_4_6_1_update_val(this);
    },
    handle_click:function(event){
        //点击当前 高亮显示
        try{
            console.log("高亮",this.data.path);
            this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
        if (this.data.click){
            try{
                this.data.click(event)
                
                // console.log("start click2")
            }
            catch{}
            return 
        }
        if (this.data.click_obj){
            try{
                lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
            
                // console.log("start click3")
            }
            catch{}
            return 
        }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    }
  },
  mounted:function(){
    if(_this.deepcopy_data.value=='false'){
        this.data.value_init=true;
    }
    try{
        _this.data.select_list_eval=JSON.parse(JSON.stringify(_this.deepcopy_data.father_data2.解析后的数据结构[_this.deepcopy_data.key2].select_list_eval));
        let select_list=[];
        for(let i=_this.data.select_list_eval[0];i<=_this.data.select_list_eval[1];i++){
            let val=_this.replaceEvalExpressions(_this.data.select_list_eval[2],{i:i});
            let text=_this.replaceEvalExpressions(_this.data.select_list_eval[3],{i:i});
            // console.log('val,text',val,text)
            select_list.push([val,text]);
        }
        _this.$set(_this.data,"select_list",select_list);
    }catch{}
    
  }

})
Vue.component2('a_1_0_4_6_1_bool_line', {
    template: `
        <div :class="{ 'a_1_0_4_6_1_lines test': data.true, 'a_1_0_4_6_1_lines_onclick': data.onclick_flag }" v-show="show_flag">
        <span class="a_1_0_4_6_1_hid_line":style="'padding-left: '+data._space_+'px;'"></span>
        <span  class="icon iconfont icon-str" style="color: #ff7400;"></span>
        
        <span style="color:#bcbcbc">{{data.ch_name}}[{{data.name}}]</span>

        
    <div style="display:inline-block;flex:1;"><div style="display:flex;justify-content: flex-end;display: flex;">
    

    <select v-model="data.value"  class="a_1_0_4_6_1_right a_1_0_4_6_1_input_css" @change="updateProperty">
        <option value="false">False</option>
        <option value="true">True</option>
    </select>


    </div></div>
        </div>
  `,
  data(){
    return{
        show_flag:true,
        data:{
            onclick_flag:false,
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            false:false,
            close:true,
            name:"",
            ch_name:'',
            _space_:0,
            value:false,
            value_init:false,
        }
    }
  },
  methods:{
    updateProperty:function(event){
        a_1_0_4_6_1_update_val(this);
    },
    handle_click:function(event){
        //点击当前 高亮显示
        try{
            console.log("高亮",this.data.path);
            this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
        if (this.data.click){
            try{
                this.data.click(event)
                
                // console.log("start click2")
            }
            catch{}
            return 
        }
        if (this.data.click_obj){
            try{
                lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
            
                // console.log("start click3")
            }
            catch{}
            return 
        }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    }
  },
  mounted:function(){
    if(_this.deepcopy_data.value==false){
        this.data.value_init=true;
    }
  }

})
//str 列
Vue.component2('a_1_0_4_6_1_str_line', {  
    template: `
        <div :class="{ 'a_1_0_4_6_1_lines test': data.true, 'a_1_0_4_6_1_lines_onclick': data.onclick_flag }" v-show="show_flag">
        <span class="a_1_0_4_6_1_hid_line":style="'padding-left: '+data._space_+'px;'"></span>
        <span  class="icon iconfont icon-str" style="color: #ff7400;"></span>
        
        <span style="color:#bcbcbc">{{data.ch_name}}[{{data.name}}]</span>

        
    <div style="display:inline-block;flex:1;"><div style="display:flex;justify-content: flex-end;display: flex;">
        <input   @input="updateProperty($event.target.value)"   type="text" class="a_1_0_4_6_1_right a_1_0_4_6_1_input_css"  v-model="data.value">
    </div></div>
        </div>
  `,
  data(){
    return{
        show_flag:true,
        data:{
            onclick_flag:false,
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            false:false,
            close:true,
            name:"",
            ch_name:'',
            _space_:0,
            value:"",
        }
    }
  },
  methods:{
    
    
    updateProperty:function(val){a_1_0_4_6_1_update_val(this);},
    handle_click:function(event){
        //点击当前 高亮显示
        try{//console.log("高亮",this.data.path);
this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
        if (this.data.click){
            try{
                this.data.click(event)
                
                // console.log("start click2")
            }
            catch{}
            return 
        }
        if (this.data.click_obj){
            try{
                lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
            
                // console.log("start click3")
            }
            catch{}
            return 
        }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    }
  }})
  Vue.component2('a_1_0_4_6_1_list_text_line', {  
    template: `
        <div :class="{ 'a_1_0_4_6_1_lines test': data.true, 'a_1_0_4_6_1_lines_onclick': data.onclick_flag }" v-show="show_flag">
        <span class="a_1_0_4_6_1_hid_line":style="'padding-left: '+data._space_+'px;'"></span>
        <span  class="icon iconfont icon-str" style="color: #ff7400;"></span>
        
        <span style="color:#bcbcbc">{{data.ch_name}}[{{data.name}}]</span>

        
    <div style="display:inline-block;flex:1;"><div style="display:flex;justify-content: flex-end;display: flex;">
        <input   @input="updateProperty($event.target.value)"   type="text" class="a_1_0_4_6_1_right a_1_0_4_6_1_input_css"  v-model="data.value">
    </div></div>
        </div>
  `,
  data(){
    return{
        show_flag:true,
        data:{
            onclick_flag:false,
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            false:false,
            close:true,
            name:"",
            ch_name:'',
            _space_:0,
            value:"",
        }
    }
  },
  methods:{
    
    
    updateProperty:function(val){a_1_0_4_6_1_update_val(this);},
    handle_click:function(event){
        //点击当前 高亮显示
        try{//console.log("高亮",this.data.path);
this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
        if (this.data.click){
            try{
                this.data.click(event)
                
                // console.log("start click2")
            }
            catch{}
            return 
        }
        if (this.data.click_obj){
            try{
                lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
            
                // console.log("start click3")
            }
            catch{}
            return 
        }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    }
  }})
  Vue.component2('a_1_0_4_6_1_number_line', {  
    template: `
        <div :class="{ 'a_1_0_4_6_1_lines test': data.true, 'a_1_0_4_6_1_lines_onclick': data.onclick_flag }" v-show="show_flag">
        <span class="a_1_0_4_6_1_hid_line":style="'padding-left: '+data._space_+'px;'"></span>
        <span  class="icon iconfont icon-str" style="color: #ff7400;"></span>
        
        <span style="color:#bcbcbc">{{data.ch_name}}[{{data.name}}]</span>

        
    <div style="display:inline-block;flex:1;"><div style="display:flex;justify-content: flex-end;display: flex;">
        <input   @input="updateProperty($event.target.value)"   type="text" class="a_1_0_4_6_1_right a_1_0_4_6_1_input_css"  v-model="data.value">
    </div></div>
        </div>
  `,
  data(){
    return{
        show_flag:true,
        data:{
            onclick_flag:false,
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            false:false,
            close:true,
            name:"",
            ch_name:'',
            _space_:0,
            value:"",
        }
    }
  },
  methods:{
    
    updateProperty:function(val){a_1_0_4_6_1_update_val(this);},
    handle_click:function(event){
        //点击当前 高亮显示
        try{//console.log("高亮",this.data.path);
this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
        if (this.data.click){
            try{
                this.data.click(event)
                
                // console.log("start click2")
            }
            catch{}
            return 
        }
        if (this.data.click_obj){
            try{
                lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
            
                // console.log("start click3")
            }
            catch{}
            return 
        }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    }
  }})
  //str 列
  Vue.component2('a_1_0_4_6_1_dict_item_line', {  
      template: `
<div :class="{ 'a_1_0_4_6_1_lines test': data.true, 'a_1_0_4_6_1_lines_onclick': data.onclick_flag }" class="" @click="handle_click" v-show="show_flag">
    <span class="a_1_0_4_6_1_hid_line":style="'padding-left: '+data._space_+'px;'"></span>
    <span  v-if="data.icon1_show_flag":class="{'icon iconfont':data.true,'icon-right':data.close,'icon-down':data.close==false}"></span>
    <span style="color:#bcbcbc">{{data.name}}</span>
    <div style="display:inline-block;flex:1;"><div style="display:flex;justify-content: flex-end;display: flex;"><div  @click="click1($event,k)" v-for="(v,k) in data.icon_data":key="k">
        <a_1_0_3_0_0 style="display: inline-block;":deepcopy_data="v">
        </a_1_0_3_0_0></div></div>
    </div>

</div>
    `,
    data(){
      return{
          show_flag:true,
          data:{
              onclick_flag:false,
              icon1_show_flag:true,
              click:null,
              click_obj:null,
              true:true,
              false:false,
              close:true,
              name:"",
              _space_:0,
              icon_data:{},
          }
      }
    },
    methods:{
      handle_click:function(event){
          //点击当前 高亮显示
          try{//console.log("高亮",this.data.path);
this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
          if (this.data.click){
              try{
                  this.data.click(event)
                  
                  // console.log("start click2")
              }
              catch{}
              return 
          }
          if (this.data.click_obj){
              try{
                  lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
              
                  // console.log("start click3")
              }
              catch{}
              return 
          }
          try{
              this.data.click_handle(this.data.path,this.data.close);
          }catch{}
      },
      click1:async function(event,k){
        /* console.log(',,,',this.data.icon_data[k].click)*/
         if(!this.data.click_stop){event.stopPropagation();}//阻止父级
         lhp_run_func(this.data.icon_data[k].click);
    
     }
    },
    mounted:function(){
        
    
    _this.data.icon_data={
        1:{
            icon_class:"icon iconfont icon-shanchu",
            hovertext:"删除项",
            add_show:false,
            click:async function(){

                window.a_1_0_4_6_1_update_del_item(_this);




            }
            },
    }
    }


})
  //str 列
  Vue.component2('a_1_0_4_6_1_class_line', {  
      template: `
          <div :class="{ 'a_1_0_4_6_1_lines test': data.true, 'a_1_0_4_6_1_lines_onclick': data.onclick_flag }" v-show="show_flag">
          <span class="a_1_0_4_6_1_hid_line":style="'padding-left: '+data._space_+'px;'"></span>
          <span class="icon iconfont icon-css"  style="color: #42ff42;"></span>
          
          <span style="color:#bcbcbc">{{data.ch_name}}[{{data.name}}]</span>
    <div style="display:inline-block;flex:1;"><div style="display:flex;justify-content: flex-end;display: flex;">
        <input   @input="updateProperty($event.target.value)" type="text" class="a_1_0_4_6_1_right a_1_0_4_6_1_input_css"  v-model="data.value">
    </div></div>
          </div>
    `,
    data(){
      return{
          show_flag:true,
          data:{
              onclick_flag:false,
              icon1_show_flag:true,
              click:null,
              click_obj:null,
              true:true,
              false:false,
              close:true,
              name:"",
              ch_name:'',
              _space_:0,
              value:"",
          }
      }
    },
    methods:{    
    updateProperty:function(val){a_1_0_4_6_1_update_val(this);},
      handle_click:function(event){
          //点击当前 高亮显示
          try{//console.log("高亮",this.data.path);
this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
          if (this.data.click){
              try{
                  this.data.click(event)
                  
                  // console.log("start click2")
              }
              catch{}
              return 
          }
          if (this.data.click_obj){
              try{
                  lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
              
                  // console.log("start click3")
              }
              catch{}
              return 
          }
          try{
              this.data.click_handle(this.data.path,this.data.close);
          }catch{}
      }
    }})
    //str 列
  Vue.component2('a_1_0_4_6_1_url_line', {  
      template: `
          <div :class="{ 'a_1_0_4_6_1_lines test': data.true, 'a_1_0_4_6_1_lines_onclick': data.onclick_flag }" v-show="show_flag">
          <span class="a_1_0_4_6_1_hid_line":style="'padding-left: '+data._space_+'px;'"></span>
          <span class="icon iconfont icon-url" style="color: #cbb800;"></span>
          
          <span style="color:#bcbcbc">{{data.ch_name}}[{{data.name}}]</span>
    <div style="display:inline-block;flex:1;"><div style="display:flex;justify-content: flex-end;display: flex;">
    <input  @input="updateProperty($event.target.value)" type="text" class="a_1_0_4_6_1_right a_1_0_4_6_1_input_css" v-model="data.value">
    </div></div>
          </div>
    `,
    data(){
      return{
          show_flag:true,
          data:{
              onclick_flag:false,
              icon1_show_flag:true,
              click:null,
              click_obj:null,
              true:true,
              false:false,
              close:true,
              name:"",
              ch_name:'',
              _space_:0,
              value:''
          }
      }
    },
    methods:{   
    updateProperty:function(val){a_1_0_4_6_1_update_val(this);},
      handle_click:function(event){
          //点击当前 高亮显示
          try{//console.log("高亮",this.data.path);
this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
          if (this.data.click){
              try{
                  this.data.click(event)
                  
                  // console.log("start click2")
              }
              catch{}
              return 
          }
          if (this.data.click_obj){
              try{
                  lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
              
                  // console.log("start click3")
              }
              catch{}
              return 
          }
          try{
              this.data.click_handle(this.data.path,this.data.close);
          }catch{}
      }
    }})
  
//dict列
Vue.component2('a_1_0_4_6_1_dict_line', {  
  template: `
      <div :class="{ 'a_1_0_4_6_1_lines test': data.true, 'a_1_0_4_6_1_lines_onclick': data.onclick_flag }" class="" @click="handle_click" v-show="show_flag">
      <span class="a_1_0_4_6_1_hid_line":style="'padding-left: '+data._space_+'px;'"></span>
      <span  v-if="data.icon1_show_flag":class="{'icon iconfont':data.true,'icon-right':data.close,'icon-down':data.close==false}"></span>
      
      <span style="color:#bcbcbc">{{data.ch_name}}[{{data.name}}]</span>

      
        <div style="display:inline-block;flex:1;">

        <div style="display:flex;
    justify-content: flex-end;
    display: flex;">
    
        <div  @click="click1($event,k)" v-for="(v,k) in data.icon_data"
        :key="k">
         <a_1_0_3_0_0 style="display: inline-block;"
         :deepcopy_data="v"></a_1_0_3_0_0>
        </div>

        </div>

        </div>
      </div>
`,
data(){
  return{
      show_flag:true,
      data:{
          onclick_flag:false,
          icon1_show_flag:true,
          click:null,
          click_obj:null,
          true:true,
          false:false,
          close:true,
          name:"",
          ch_name:'',
          _space_:0,
          icon_data:{},
      }
  }
},
methods:{
  handle_click:function(event){
      //点击当前 高亮显示
      try{console.log("高亮",this.data.path);
this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
      if (this.data.click){
          try{
              this.data.click(event)
              
              // console.log("start click2")
          }
          catch{}
          return 
      }
      if (this.data.click_obj){
          try{
              lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
          
              // console.log("start click3")
          }
          catch{}
          return 
      }
      try{
          this.data.click_handle(this.data.path,this.data.close);
      }catch{}
  },
  
  click1:async function(event,k){
    /* console.log(',,,',this.data.icon_data[k].click)*/
     if(!this.data.click_stop){event.stopPropagation();}//阻止父级
     lhp_run_func(this.data.icon_data[k].click);

 }
},


mounted:function(){

    
    _this.data.icon_data={
        1:{
            icon_class:"icon iconfont icon-add",
            hovertext:"添加项",
            add_show:false,
            click:async function(){
        window.a_1_0_4_6_1_update_add_item(_this);



            }
            },
    }
    
}

})

//dict列
Vue.component2('a_1_0_4_6_1_dict2_line', {  
    template: `
        <div :class="{ 'a_1_0_4_6_1_lines test': data.true, 'a_1_0_4_6_1_lines_onclick': data.onclick_flag }" class="" @click="handle_click" v-show="show_flag">
        <span class="a_1_0_4_6_1_hid_line":style="'padding-left: '+data._space_+'px;'"></span>
        <span  v-if="data.icon1_show_flag":class="{'icon iconfont':data.true,'icon-right':data.close,'icon-down':data.close==false}"></span>
        
        <span style="color:#bcbcbc">{{data.ch_name}}[{{data.name}}]</span>
  
        
          <div style="display:inline-block;flex:1;">
  
          <div style="display:flex;
      justify-content: flex-end;
      display: flex;">
      
          <div  @click="click1($event,k)" v-for="(v,k) in data.icon_data"
          :key="k">
           <a_1_0_3_0_0 style="display: inline-block;"
           :deepcopy_data="v"></a_1_0_3_0_0>
          </div>
  
          </div>
  
          </div>
        </div>
  `,
  data(){
    return{
        show_flag:true,
        data:{
            onclick_flag:false,
            icon1_show_flag:true,
            click:null,
            click_obj:null,
            true:true,
            false:false,
            close:true,
            name:"",
            ch_name:'',
            _space_:0,
            icon_data:{},
        }
    }
  },
  methods:{
    handle_click:function(event){
        //点击当前 高亮显示
        try{//console.log("高亮",this.data.path);
  this.data.tree_data.set_onclick_flag(this.data.path)}catch{}
        if (this.data.click){
            try{
                this.data.click(event)
                
                // console.log("start click2")
            }
            catch{}
            return 
        }
        if (this.data.click_obj){
            try{
                lhp_run_func(this.data.click_obj.func,this.data.click_obj.args)
            
                // console.log("start click3")
            }
            catch{}
            return 
        }
        try{
            this.data.click_handle(this.data.path,this.data.close);
        }catch{}
    },
    
    click1:async function(event,k){
      /* console.log(',,,',this.data.icon_data[k].click)*/
       if(!this.data.click_stop){event.stopPropagation();}//阻止父级
       lhp_run_func(this.data.icon_data[k].click);
  
   }
  },
  
  
  mounted:function(){
      _this.data.icon_data={
      }
      
  }
  
  })
  
  

//计时器
window.a_1_0_4_6_1_timer=null;
//待处理数据列表
window.a_1_0_4_6_1_timer_lst=[];
//计时器运行函数
window.a_1_0_4_6_1_timer_func= async function(){
  while(window.a_1_0_4_6_1_timer_lst.length){
      let new_obj=window.a_1_0_4_6_1_timer_lst.shift();
      let func=new_obj.func;
      if(func.constructor.name === 'AsyncFunction'){
          await func(new_obj.params);
      } else{
          func(new_obj.params);
      }
  }
  window.a_1_0_4_6_1_timer=null;
};
//给计数器运行的函数添加待处理数据  如果计时器没有开启则开启计时器
window.a_1_0_4_6_1_timer_start=function(obj) {  
  window.a_1_0_4_6_1_timer_lst.push(obj);
  if(window.a_1_0_4_6_1_timer==null){

      window.a_1_0_4_6_1_timer = setTimeout(a_1_0_4_6_1_timer_func, 0);    // 设置计时器为开启状态  
  }
}  
Vue.component2('a_1_0_4_6_1_menu2', {  
    template: `
        <div class="a_1_0_4_6_1_menu_bar" :key="refresh"  :style="'width:'+data.width">
            <div class="a_1_0_4_6_1_activity_item" v-for="(menu_id, index) in data.fast_menu" :key="index" @click="selectActivity(menu_id)" :class="{ a_1_0_4_6_1_active: menu_id == selectedActivity }"@mouseover="showSubMenu(menu_id)" @mouseleave="hideSubMenu(menu_id)">
                <span :class="data.menus[menu_id].menu_class"></span>
                <div class="a_1_0_4_6_1_sub_menu" v-if="menu_id==show_menu">
                    <div class="a_1_0_4_6_1_menu_item">
                        {{data.menus[menu_id].menu_name}}
                    </div>
                </div>
            </div>
        </div>
  `,  
  data() {
      return {
        
        show_menu:"-1",
        selectedActivity:'0',
        refresh:"1",/*用来刷新组件*/
        data:{
            width:"100%",
            menu_str:'',
            menus: {
  
        },
        fast_menu:[],//存放menus ids的数组 ids被转为整数 按照sort顺序排列
        show_flag:{}
        }
         
      };
  },
  watch:{
  'data.menu_str':function(e)
  {
    _this.menus=JSON.parse(e);
    _this.refresh_func();//刷新组件
  }},
  methods: {
    showSubMenu(menu_id) {
        if (this.show_menu!=menu_id){
            this.show_menu=menu_id;
            // console.log(this.show_menu)
            this.refresh=this.refresh=="2"?"1":"2";
        }
    },
    hideSubMenu(menu_id) {
        this.show_menu=null;
        this.refresh=this.refresh=="2"?"1":"2";
    },
    selectActivity(id) {
        this.selectedActivity = id;
        try{this.data.menus[this.selectedActivity].func(this.selectedActivity);}
        catch{console.log("点击菜单后出错！")
}
    },
  
  },
  mounted:function(){
    //调用此函数刷新整个组件
    _this.refresh_func=function(){
        //创建菜单目录 快速查找数组
        _this.data.fast_menu=(Object.keys(_this.data.menus).map(Number)).sort();
        _this.refresh=_this.refresh=="2"?"1":"2";
    }
  
    
      //设置选项
      _this.data.set_menu=function(obj){
        /*
        var_name:全局变量 【window[var_name]】
        menu_id:选项id
        menu_name:选项名称
        menu_class:选项类
        menu_keys:选项快捷方式
        */
       let menu_id=obj.menu_id;
       let var_name=obj.var_name;
       let menu_name=obj.menu_name;
       let menu_class=obj.menu_class;
       let menu_keys=obj.menu_keys;
       let func=obj.func;
       //如果已经拥有这个目录 那么仅修改名称
       if (_this.data.menus.hasOwnProperty(menu_id)){
        _this.data.menus[menu_id]['menu_name']=menu_name;
        _this.data.menus[menu_id]['menu_class']=menu_class;
        _this.data.menus[menu_id]['menu_keys']=menu_keys;
        _this.data.menus[menu_id]['func']=func;
       }else{
        //如果没有拥有则新建一个
        _this.data.menus[menu_id]={
            "menu_name":menu_name,
            "menu_keys":menu_keys,
            "var_name":var_name,
            "menu_class":menu_class,
            "func":func,
        }
       }
       _this.refresh_func();//刷新组件
      },
      _this.data.选择=_this.selectActivity;
      //绑定快捷方式对象
      _this.data.bind_fast_obj=function(fast_obj){
        /*快捷方式通过全局 快捷方式对象进行调用*/
      }
  }
  } 
  );
  
Vue.component2('a_1_0_4_6_1_dict', {  
  template: `
      <div class="a_1_0_4_6_1_base" ref="father"v-show="data.show_flag">
      </div>
`,  
data() {
    return {
      show_index:'-1',
      callback:"",
      init_flag:0,
      now_select:"-1",
      refresh:"1",/*用来刷新组件*/
      data:{
          k:{},//数据的格式
          tree_data:{check_dct:{}},//数据会传递给所有子节点的vue对象.data.tree_data中
          show_flag:true,
          data:{},//存储的数据
          data_init:false,
          close:true,
          fast_data:{}, //快速访问dom
          fast_vue_data:{},//快速访问vue
          open_dict:{},//节点展开的状态保存
          open_dict_init:false,//open_dict初始化
          
          解析后的数据结构:null,
          解析后的数据:null,
          deepcopy_data:{},
          data_info:{}
          
      },
    };
},
methods:{
  //添加进时间处理器中 同步进行处理
  add_timer:function(){},
  insertAfter:function(newNode, referenceNode, parentNode) {  
      if(referenceNode==parentNode){
          parentNode.appendChild(newNode);  
          return
      }
      // 将 newNode 插入到 referenceNode 之后  
      if (referenceNode.nextSibling) {  
          // /* console.log("?")*/
          parentNode.insertBefore(newNode, referenceNode.nextSibling);  
      } else {  
          //如果是最后一个子节点 则追加
          let father_child_lst=parentNode.children;
          if (father_child_lst[father_child_lst.length-1]===referenceNode){
              parentNode.appendChild(newNode);
              return
          }
          //否则插入
          // 获取父元素的第一个子节点  
          let firstChild = parentNode.firstChild;  
            
          // 在第一个子节点之前插入新节点  
          if (firstChild) {  
              parentNode.insertBefore(newNode, firstChild);  
              // parentNode.appendChild(newNode);  
          } else {  
              // 如果没有子节点，直接添加新节点  
              parentNode.appendChild(newNode);  
          }
      }  
  },
  handle_click:function(event,flag=null){

    // event.target 是触发点击事件的元素  
    let clickedElement = event.target;  
    if(!flag){event.stopPropagation();}//阻止父级
  }
},
mounted:function(){
  window['dddd']=_this
  window['dddd']=_this
  console.log("_this.deepcopy_data.tree_data.",_this.deepcopy_data,_this.deepcopy_data.tree_data);
  if(!_this.deepcopy_data.tree_data){
      _this.deepcopy_data.tree_data={check_dct:{}};
  }
  _this.deepcopy_data.tree_data.get_father=function(){
      return _this.data
  }
  _this.set_open_dict=function(dict,path){
      let  open_dict= _this.data.open_dict;
      let  copy_dict=_this.data.copy({dict:dict});
      // delete copy_dict.close;
      let path_lst=path.split(".");
      for(let i=0;i<path_lst.length;i++){
          open_dict=open_dict[path_lst[i]];
      }
      let v={};
      for (let k in copy_dict){
          if(open_dict.hasOwnProperty(k)){continue}
          else{
              v[k]=copy_dict[k];
          }
      }
      if(!open_dict.hasOwnProperty('close')){open_dict.close=copy_dict.close}
      open_dict.num=copy_dict.num;
      lhp_deepcopy1(open_dict,v)
  }
  _this.data.get_close=function(path){
      let path_lst=path.split(".");
      let check_open_dct=_this.data.open_dict;
      for(let i=0;i<path_lst.length;i++){
          check_open_dct=check_open_dct[path_lst[i]];
      }
      return check_open_dct.close;
  }
  //获取父节点下上一个子节点的key 没有则返回-In...
  _this.data.get_before=function(father_path,key){
      console.log("father,k",father_path,key)
      let path_lst=father_path.split(".");
      let check_open_dct=_this.data.open_dict;
      for(let i=0;i<path_lst.length;i++){
          check_open_dct=check_open_dct[path_lst[i]];
      }
      let key_v=Number(key);
      let maxIntKey = -Infinity;  
      for (let k in check_open_dct) {  
          if (check_open_dct.hasOwnProperty(k)) {  
              let intKey = Number(k);  
              if (!isNaN(intKey) && intKey < key_v && intKey > maxIntKey) {  
                  maxIntKey = intKey;  
              }  
          }  
      }  
      if (maxIntKey==-Infinity){return -Infinity}
      else{
          return father_path+'.'+maxIntKey;
      }


  }
  //获取到目标节点的最后一个dom
  _this.data.get_last=function(path){
      let path_lst=path.split(".");
      let check_open_dct=_this.data.open_dict;
      for(let i=0;i<path_lst.length;i++){
          check_open_dct=check_open_dct[path_lst[i]];
      }
      let last_path=path;
      while (1){
          if (check_open_dct.close==true){return _this.data.fast_data[last_path]}
          else{
              // 提取并转换所有可以转换为整数的键  
              let intKeys = Object.keys(check_open_dct).filter(key => /^\d+$/.test(key)).map(Number);  
              if(!intKeys.length){return _this.data.fast_data[last_path]}
              let maxIntKey = Math.max(...intKeys);  
              check_open_dct=check_open_dct[maxIntKey];
              last_path=last_path+'.'+maxIntKey;
          }
      }
  }
  _this.data._set_dict=function(obj){
      
      let dict=obj.dict;
     let path=obj.path;
      // console.log("_this.data.get_close(path)",_this.data.get_close(path))
      //加载这部分的this.data.open_dict
      console.log("dict path",dict,path)
      _this.set_open_dict(dict,path);
      //加载这部分内容到this.data.data中
      let path_lst=path.split(".");
      // let last_k=path_lst[path_lst.length-1];
      // let father_path=path.substring(0, path.lastIndexOf('.'));  
      console.log("dict path",dict,path)
      let father_close=_this.data.get_close(path);
      // console.log("_this.data.get_close(path)1",_this.data.get_close(path))
      let set_data=_this.data.data;
      // console.log("_this.data.get_close(path)2",_this.data.get_close(path))
      for(let i=0;i<path_lst.length;i++){
          set_data=set_data['dict'][path_lst[i]];
      }
      // console.log("_this.data.get_close(path)3",_this.data.get_close(path))
      for (let key in dict){
          if(!set_data['dict'][key]){
              // console.log("检测到新增的数据",path+'.'+key)
              set_data['dict'][key]=dict[key]
              // console.log("检测父组件显示状态（显示则为True",!father_close)
              //如果这部分正在显示 那么创建这个dom
              if(!father_close){
                  console.log("dict[key].base_info",dict[key].base_info)
                              let vue_name=dict[key].base_info.vue_name||'a_1_0_4_6_1_lines';//要渲染的vue模板名称
                              //新建一个dom
                              let new_dom=document.createElement(vue_name);
                              //设置dom属性 ref值为ref_obj
                              new_dom.setAttribute('ref', 'ref_obj');
                              let t_deepcopy_data=JSON.parse(JSON.stringify(dict[key].base_info.deepcopy_data));
                              t_deepcopy_data['_space_']=path_lst.length*8;//退格
                              t_deepcopy_data['key']=path+'.'+key;
                              t_deepcopy_data['father_data']=_this.data.father_data;
                              t_deepcopy_data['dict_key']=_this.data.name;
                              t_deepcopy_data['click_handle']=_this.data.click_handle;
                              new_dom.setAttribute(':deepcopy_data',"deepcopy_data");//初始化vue模板的参数
                              new_dom.setAttribute('dom_path',path+'.'+key);//初始化vue模板的参数
                              let vue_dct={'el':new_dom,data:{true:true,false:false,null:null,deepcopy_data:t_deepcopy_data}}
                              let before_path=_this.data.get_before(path,key);
                              console.log("???beforepath",before_path,path,key)
                              if(before_path==-Infinity){
                                  _this.insertAfter(new_dom,_this.data.fast_data[path],_this.$refs.father);
                              }else{
                                  _this.insertAfter(new_dom,_this.data.get_last(before_path),_this.$refs.father);
                              }
                              let new_vue=new Vue(vue_dct);
                              // window.test_vue=new_vue;
                              _this.data.fast_data[path+'.'+key]=new_vue.$el;
                              // next_dom2=new_vue.$el;
                              _this.data.fast_vue_data[path+'.'+key]=new_vue;
              }
          }else{
              // console.log("没有新增数据",path+'.'+key)
              // console.log("检测父组件显示状态（显示则为True",!father_close)
              lhp_deepcopy1(set_data['dict'][key]['base_info'],dict[key]['base_info']);
              //如果这部分正在显示 那么更新这个dom
              if(!father_close){
                  //新建一个dom
                  // new_dom=document.createElement(vue_name);
                  // //设置dom属性 ref值为ref_obj
                  // new_dom.setAttribute('ref', 'ref_obj');
                  // t_deepcopy_data['_space_']=path_lst.length*8;//退格
                  // t_deepcopy_data['path']=path;
                  // t_deepcopy_data['tree_data']=_this.data.tree_data;
                  // t_deepcopy_data['click_handle']=_this.data.click_handle;
                  // new_dom.setAttribute(':deepcopy_data',"deepcopy_data");//初始化vue模板的参数
                  // new_dom.setAttribute('dom_path',path+'.'+key);//初始化vue模板的参数
                  // let vue_dct={'el':new_dom,data:{true:true,false:false,null:null,deepcopy_data:t_deepcopy_data}}
                  // if(key==1){
                  //     _this.insertAfter(new_dom,_this.data.fast_data[path],_this.$refs.father);
                  // }else{
                  //     _this.insertAfter(new_dom,_this.data.fast_data[path+'.'+(Number(key)-1)],_this.$refs.father);
                  // }
                  // new_vue=new Vue(vue_dct);
                  // // window.test_vue=new_vue;
                  // _this.data.fast_data[path+'.'+key]=new_vue.$el;
                  // // next_dom2=new_vue.$el;
                  // _this.data.fast_vue_data[path+'.'+key]=new_vue;
                  
              }
          }
      }

      // console.log("_this.data.get_close(path)4",_this.data.get_close(path))
  }
  _this.data.set_dict=function(dict,path){
      window.a_1_0_4_6_1_timer_start({
          func:_this.data._set_dict,
          params:{
              dict:dict,
              path:path
          }
      })
     
  }
  _this.deepcopy_data.tree_data.set_dict=_this.data.set_dict;
  _this.data.show_index_callback=function(index){
      if(index==_this.show_index){
          _this.data.show_flag=true;
          if(_this.data.data_init==false){
              _this.data.data_init=true;
              // console.log("init!!!")
              _this.data.open("");
          }
      }else{_this.data.show_flag=false}
  }
  _this.data.set_show_index=function(show_index){
      _this.show_index=show_index;
  }
//初始化
_this.init=function(){
  _this.data.open('');
  _this.init_flag=1;
}
_this.data.click_handle=async function(path,close_flag){
  if(close_flag==true){
     await _this.data.open(path);
  }else{
      await _this.data.close(path);
  }
}
//展开
_this.data.set_open=function(__this){
  // console.log("设置为展开",__this)
  __this.$refs.ref_obj.data.close=false;
}
//闭合
_this.data.set_close=function(__this){
  __this.$refs.ref_obj.data.close=true;
}
_this.data.copy=function(copy_data){
  let res={};
  let lst=[[copy_data,res]];
  while (lst.length){
      let item=lst.pop();
      let new_data=item[0];
      let new_res=item[1];
      new_res.close=true;
      if (new_data.dict){
          // console.log("...")
          new_res.num=Object.keys(new_data.dict).length+1;
          for (let key in new_data.dict){
              new_res[key]={};
              new_res2=new_res[key];
              lst.push([
                  new_data.dict[key],
                  new_res2

              ])
          }
      }else{
          new_res.num=1;
      }
  }
  // console.log("end")
  return res
}
_this.sleep=function sleep(ms) {  
  return new Promise(resolve => setTimeout(resolve, ms));  
}  
_this.data.check_variable=function(variable, keyOrIndex) {  
  // 判断是数组还是对象  
  if (Array.isArray(variable)) {  
      // 如果是数组，判断索引是否存在  
      if (variable.hasOwnProperty(keyOrIndex.toString()) && Number.isInteger(Number(keyOrIndex))) {  
          // console.log(`索引 ${keyOrIndex} 存在于数组中`);  
          return 1
      } else {  
          // console.log(`索引 ${keyOrIndex} 不存在于数组中`);  
          return 2
      }  
  } else if (variable && typeof variable === 'object' && !Array.isArray(variable)) {  
      // 如果是对象，判断键是否存在  
      if (variable[keyOrIndex]) {  
          // console.log(`键 "${keyOrIndex}" 存在于对象中`);  
          return 3
      } else {  
          // console.log(`键 "${keyOrIndex}" 不存在于对象中`);  
          return 4
      }  
  } else {  
      // console.log('变量既不是数组也不是对象');  
  }  
}  
_this.data.isPlainObject=function(variable) {  
  return variable !== null &&  
         typeof variable === 'object' &&  
         !Array.isArray(variable) &&  
         Object.getPrototypeOf(variable) === Object.prototype;  
} 
function removeLastDotAndAfter(str) {  
  // 找到最后一个点的索引位置  
  let lastIndex = str.lastIndexOf('.');  
    
  // 如果找到了点，则截取点到字符串开头之间的部分  
  if (lastIndex !== -1) {  
      return str.substring(0, lastIndex);  
  }  
    
  // 如果没有找到点，则返回原始字符串  
  return str;  
}  
function splitByLastDot(str) {  
  // 查找最后一个点的索引位置  
  const lastIndex = str.lastIndexOf('.');  

  // 根据索引位置分割字符串  
  if (lastIndex !== -1) {  
      // 如果有点，返回分割后的两部分  
      return [str.slice(0, lastIndex), str.slice(lastIndex+1)];  
  } else {  
      // 如果没有点，返回原始字符串和一个空字符串  
      return [str, ''];  
  }  
} 
_this.data.get_now_open_dict=function(path){
  
  let now_open_dict=_this.data.open_dict;
  path=removeLastDotAndAfter(path);

  let new_p=path.replace("dict.","").replace("data.","");
  if (new_p.endsWith('.dict')) {  
      new_p=new_p.slice(0, -5);  
  }  
  let new_p_lst=new_p.split(".");
  // console.log("open_dict",JSON.parse(JSON.stringify(_this.data.open_dict)))
  // console.log("new_p_lst",new_p_lst)
  for(let new_p_i=0;new_p_i<new_p_lst.length;new_p_i++){
      now_open_dict=now_open_dict[new_p_lst[new_p_i]];
  }
  return now_open_dict;
}
_this.data.get_now_open_dict2=function(new_p_lst){
  
  let now_open_dict=_this.data.open_dict;
  for(let new_p_i=0;new_p_i<new_p_lst.length-1;new_p_i++){
      now_open_dict=now_open_dict[new_p_lst[new_p_i]];
  }
  return now_open_dict;
}
_this.lhp_set1=function(obj_){
  let data_type=obj_.data_type;//要修改的数据类型  post||put delete clear
  // let _this=obj_._this;//this vue对象
  let path=obj_.path;//path为data_obj要修改的数据的路径
  let data=obj_.data;//data为修改的数据
  console.log("lhp_set1",obj_)
  //类型为新增或者修改
  if (data_type=='postput'){
  let change_obj=_this.data;
  let last_path=null;
  if (path.indexOf(".") !== -1){
      let path_lst=path.split(".");
      for (let i=0;i<path_lst.length-1;i++){change_obj=change_obj[path_lst[i]]}
      last_path=path_lst[path_lst.length-1];
  }else{last_path=path}
  // console.log("change_obj",change_obj)
  // console.log("last_path",last_path)
  if(_this.data.isPlainObject(change_obj)){
      if(change_obj.hasOwnProperty(last_path)){
          lhp_deepcopy1(change_obj[last_path],JSON.parse(JSON.stringify(data)));

      }else{
          change_obj[last_path]=JSON.parse(JSON.stringify(data));
      }
  }else if(isArray(change_obj)){
      if(change_obj[last_path]!=undefined){
          lhp_deepcopy1(change_obj[last_path],JSON.parse(JSON.stringify(data)));
      }else{
          change_obj[last_path]=JSON.parse(JSON.stringify(data));
      }
  }
  // console.log("path",path)
  // console.log("_this.$set(change_obj,last_path,data)",change_obj,last_path,data)
  // lhp_deepcopy1(change_obj,JSON.parse(JSON.stringify(data)));
  //类型为删除
  }else if(data_type=="delete"){
      let change_obj=_this.data.data;
      let father_idx=null;
      let father_obj=null;
      if (path.indexOf(".") !== -1){
          let path_lst=path.split(".");
          if (path_lst.length<=1){console.log("delete异常 数量小于等于1");
return}
          for (let i=0;i<path_lst.length-1;i++){father_obj=change_obj;father_idx=path_lst[i];change_obj=change_obj[path_lst[i]];}
          let last_idx=path_lst[path_lst.length-1];
          // let new_data=JSON.parse(JSON.stringify(change_obj));
          if(typeof change_obj =="object") {  
              if (Array.isArray(change_obj)){
                  change_obj.splice(last_idx,1);

              }else{
                  delete change_obj[last_idx];
              }
      }}else{console.log("delete异常 数量小于2");
return}

      
//类型为清空数据
}else if(data_type=="clear"){
  let change_obj=_this.data;
  let last_key=null;
  if (path.indexOf(".") !== -1){
      let path_lst=path.split(".");
      for (let i=0;i<path_lst.length-1;i++){change_obj=change_obj[path_lst[i]]}
      last_key=path_lst[path_lst.length-1];
  }else{
      last_key=path;
  
  }
  let temp_val=change_obj[last_key]
switch (typeof temp_val) {  
      case 'object':  
          // 注意：这里会匹配到null，因为null也是object类型  
          // 需要额外检查是否为null  
          if (temp_val === null) {  
              change_obj[last_key] = null; // 或者你可以将null也设置为{}  
          } else if (Array.isArray(temp_val)) {  
              change_obj[last_key] = [];  
          } else {  
              change_obj[last_key] = {};  
          }  
          break;  
      case 'string':  
      change_obj[last_key] = '';  
          break;  
      case 'number':  
      change_obj[last_key] = 0;  
          break;  
      case 'boolean':  
      change_obj[last_key] = false;  
          break;  

}


}else if(data_type=='insert'){
  // let before_idx=obj_.before_idx;
  let change_obj=_this.data;
  // let last_path=null;
  // console.log("insert检查-1 obj_",obj_)
  // console.log("insert检查 前data",JSON.parse(JSON.stringify(_this.data.data)))
  if (path.indexOf(".") !== -1){
      let path_lst=path.split(".");
      for (let i=0;i<path_lst.length-1;i++){change_obj=change_obj[path_lst[i]]}
      last_path=path_lst[path_lst.length-1];
  }else{last_path=path}
  change_obj[last_path]=JSON.parse(JSON.stringify(data));
  //类型为删除
  }
}

// 示例数组
// let array = ["123", "abc", "456", "def", "789", "ghi", 0, "0", " "];

// 使用 filter 方法过滤非数字的字符串
let filteredArray = function(array){
  let res=[];
  for(let i=0;i<array.length;i++){
      try{
          let val=Number(array[i])+'';
          if (val!='NaN'){
              res.push(Number(array[i])+'');
          }
      }catch{}
  }
  return res
}
// console.log(filteredArray); // 输出: [123, 456, 789, 0]
//接收协同数据更改后 创建open_dict临时变量 以及打开当前已经显示的数据
_this.data._add_open_dict_and_open=function(obj_){
  // console.log(">>>>????FFFF")
  let data_type=obj_.data_type;//要修改的数据类型  post||put delete clear
  let _this=obj_._this;//this vue对象
  let path=obj_.path;//path为data_obj要修改的数据的路径
  let data=obj_.data;//data为修改的数据
  let path_lst=path.split(".");
  let new_path=filteredArray(path_lst);
  let ddd=new_path.join(".");
  // let last_str=path_lst[path_lst.length-1];
  //类型为新增或者修改
  if (data_type=='postput'){
      _this.lhp_set1(obj_);
      // console.log(">>>>>>????fffff2222",path)
      //检查是否属于添加新的项
      if(path_lst[path_lst.length-2]=='dict'){
          // console.log("pathlsssst",path_lst,new_path)
          let last_idx=new_path[new_path.length-1];
          //生成的open_dict
          let now_open_dict=_this.data.get_now_open_dict2(new_path);
          // console.log("now_open_dicteeeeeeeeee",now_open_dict,last_idx,data,_this.data.copy(data))
          //检查当前树是否拥有此open_dict
          if(!now_open_dict[last_idx]){
              //将生成的open_dict加载到当前树中
              now_open_dict[last_idx]=_this.data.copy(data);
              //检查上层是否是打开状态  如果是打开状态 那么打开当前层
              if(now_open_dict.close!=true){
                  let vue_name=data.base_info.vue_name||'a_1_0_4_6_1_lines';//要渲染的vue模板名称
                  //新建一个dom
                  let new_dom=document.createElement(vue_name);
                  //设置dom属性 ref值为ref_obj
                  new_dom.setAttribute('ref', 'ref_obj');
  // console.log("??key??!2")
                  let t_deepcopy_data=JSON.parse(JSON.stringify(data.base_info.deepcopy_data));
                  t_deepcopy_data['_space_']=(new_path.length-1)*8;//退格
                  t_deepcopy_data['key']=ddd;
                  t_deepcopy_data['tree_data']=_this.data.tree_data;
                  t_deepcopy_data['click_handle']=_this.data.click_handle;
                  new_dom.setAttribute(':deepcopy_data',"deepcopy_data");//初始化vue模板的参数
                  new_dom.setAttribute('dom_path',ddd);//初始化vue模板的参数
                  let vue_dct={'el':new_dom,data:{true:true,false:false,null:null,deepcopy_data:t_deepcopy_data}}
                  let pathxx=splitByLastDot(ddd);
                  let before_path=_this.data.get_before(...pathxx);
  // console.log("??key??!3")
                  // console.log("???beforepath",before_path,path,key)
                  if(before_path==-Infinity){
                      _this.insertAfter(new_dom,_this.data.fast_data[pathxx[0]],_this.$refs.father);
                  }else{
                      _this.insertAfter(new_dom,_this.data.get_last(before_path),_this.$refs.father);
                  }
                  // console.log("??key??!2")
                  let new_vue=new Vue(vue_dct);
                  // window.test_vue=new_vue;
                  _this.data.fast_data[ddd]=new_vue.$el;
                  // next_dom2=new_vue.$el;
                  _this.data.fast_vue_data[ddd]=new_vue;
              }
          }
          return
      }
      //检查是否时更改组件内容
      if(path_lst[path_lst.length-1]=='deepcopy_data'){
              let path_lst2=ddd.split(".");
              let now_set_obj=_this.data.tree_data.全局配置对象.update_obj.data[_this.data['config_name']];
              // let now_set_obj=_this.data.data;
              for(let i=0;i<path_lst2.length;i++){
                  now_set_obj=now_set_obj['dict'][path_lst2[i]];
              }
              try{_this.data.fast_vue_data[ddd].$refs['ref_obj'].init_val()}catch{}
              lhp_deepcopy1(_this.data.fast_vue_data[ddd].$refs['ref_obj'].data,JSON.parse(JSON.stringify(now_set_obj.base_info.deepcopy_data)));
          return
      }


  let change_obj=_this.data;
  let last_path=null;
  if (path.indexOf(".") !== -1){

      for (let i=0;i<path_lst.length-1;i++){change_obj=change_obj[path_lst[i]]}
      last_path=path_lst[(path_lst.length-1)];
  }else{last_path=path}
  // let select=_this.data.check_variable(change_obj,last_path);
  // console.log("检查这条数据 如果数据线内有数据)不存于open_dict那么,_this.data.isPlainObject(change_obj[last_path])",_this.data.isPlainObject(change_obj[last_path]))
  //检查这条数据 如果数据线内有数据)不存于open_dict那么
      if(_this.data.isPlainObject(change_obj[last_path])){
          let dict_flag=false;
         if (change_obj[last_path].hasOwnProperty('dict')){
          dict_flag=true;
          // _this.data._set_dict({
          //     dict:change_obj[last_path].dict,
          //     path:path.replace("data.","").replace("dict.","").replace(".dict","")
          // })
          // console.log("data1")
          let copy_open_dict={};
          if (last_path=='data'){return}
          copy_open_dict[last_path]=_this.data.copy(change_obj[last_path]);
          let now_open_dict=_this.data.get_now_open_dict(path);
          // console.log("now_open_dict",now_open_dict)
          // console.log("copy_open_dict",copy_open_dict)
          lhp_deepcopy1(now_open_dict,copy_open_dict);
          // console.log("startx",now_open_dict.close)
          if(now_open_dict.close==false){
              let ddd=path.replace("data.","").replace("dict.","").replace(".dict","");
              let path_lst=ddd.split(".");
              let now_set_obj=_this.data.data;
              for(let i=0;i<path_lst.length;i++){
                  now_set_obj=now_set_obj['dict'][path_lst[i]];
              }
              console.log()
              //如果没有被显示
              if  (!_this.data.fast_data.hasOwnProperty(ddd)){
                  console.log("没有显示")
                  // console.log("??key??!1")
                                  let vue_name=now_set_obj.base_info.vue_name||'a_1_0_4_6_1_lines';//要渲染的vue模板名称
                                  //新建一个dom
                                  let new_dom=document.createElement(vue_name);
                                  //设置dom属性 ref值为ref_obj
                                  new_dom.setAttribute('ref', 'ref_obj');
                  // console.log("??key??!2")
                                  let t_deepcopy_data=JSON.parse(JSON.stringify(now_set_obj.base_info.deepcopy_data));
                                  t_deepcopy_data['_space_']=(path_lst.length-1)*8;//退格
                                  t_deepcopy_data['path']=ddd;
                                  t_deepcopy_data['tree_data']=_this.data.tree_data;
                                  t_deepcopy_data['click_handle']=_this.data.click_handle;
                                  new_dom.setAttribute(':deepcopy_data',"deepcopy_data");//初始化vue模板的参数
                                  new_dom.setAttribute('dom_path',ddd);//初始化vue模板的参数
                                  let vue_dct={'el':new_dom,data:{true:true,false:false,null:null,deepcopy_data:t_deepcopy_data}}
                                  let pathxx=splitByLastDot(ddd);
                                  let before_path=_this.data.get_before(...pathxx);
                  // console.log("??key??!3")
                                  // console.log("???beforepath",before_path,path,key)
                                  if(before_path==-Infinity){
                                      _this.insertAfter(new_dom,_this.data.fast_data[pathxx[0]],_this.$refs.father);
                                  }else{
                                      _this.insertAfter(new_dom,_this.data.get_last(before_path),_this.$refs.father);
                                  }
                                  // console.log("??key??!2")
                                  let new_vue=new Vue(vue_dct);
                                  // window.test_vue=new_vue;
                                  _this.data.fast_data[ddd]=new_vue.$el;
                                  // next_dom2=new_vue.$el;
                                  _this.data.fast_vue_data[ddd]=new_vue;
                                  // console.log("??key??!3")


              }

                                 
  }


}

      if(dict_flag==false){
          if(last_path=='deepcopy_data'){
              // console.log("开始处理deepcopy数据")
              let ddd=path.replace("data.","").replace("dict.","").replace(".dict","").replace(".base_info.deepcopy_data",'');
              console.log("ddd",ddd)
              let path_lst=ddd.split(".");
              let now_set_obj=_this.data.data;
              for(let i=0;i<path_lst.length;i++){
                  now_set_obj=now_set_obj['dict'][path_lst[i]];
              }
              // console.log("_this.data.fast_vue_data[ddd]",_this.data.fast_vue_data[ddd]);
              // console.log("JSON.parse(JSON.stringify(now_set_obj.base_info.deepcopy_data))",JSON.parse(JSON.stringify(now_set_obj.base_info.deepcopy_data)))
              lhp_deepcopy1(_this.data.fast_vue_data[ddd].$refs['ref_obj'].data,JSON.parse(JSON.stringify(now_set_obj.base_info.deepcopy_data)));
      // ttime3(_this.data.fast_vue_data[path],'ref_obj',,func2_lst=[]);//拷贝数据到vue对象内
          }
      }
      }else{
      }

  //检查这条数据 将本该展开的部分展开

  // //检查这条数据 将已展开的且拥有更新deepcopy_data选项全部更新到节点
  


  // lhp_deepcopy1(change_obj[last_path],JSON.parse(JSON.stringify(data)));
  //类型为删除
  }else if(data_type=="delete"){
      try{
          let ddd=path.replace("data.","").replace("dict.","").replace(".dict","");
          //如果处于展开状态 那么关闭展开
              let change_obj=_this.data;
              let last_path=null;
              if (path.indexOf(".") !== -1){
                  let path_lst=path.split(".");
                  for (let i=0;i<path_lst.length-1;i++){change_obj=change_obj[path_lst[i]]}
                  last_path=path_lst[(path_lst.length-1)];
              }else{last_path=path}
              //检查是否是对象
              if(_this.data.isPlainObject(change_obj[last_path])){
                  let dict_flag=false;
                 if (change_obj[last_path].hasOwnProperty('dict')){
                  dict_flag=true;
                  let now_open_dict=_this.data.get_now_open_dict(path);
                  
                  if(now_open_dict.close==false){
                      _this.data._close(ddd);
          }
          
          
          }
          
          }  
          //如果存在快速访问方式 那么删除快速访问
          if (_this.data.fast_data[ddd]){
              try{
                  console.log("del ddd",ddd)
                  let open_del=_this.data.open_dict;
                  let d_path_lst=ddd.split(".");
                  for (let i9=0;i9<d_path_lst.length-1;i9++){open_del=open_del[d_path_lst[i9]]}
                  delete open_del[d_path_lst[d_path_lst.length-1]];
                  _this.$refs.father.removeChild(_this.data.fast_data[ddd]);
                  delete _this.data.fast_data[ddd];
                  delete _this.data.fast_vue_data[ddd];
              }catch{}
          
          }
          //删除数据
          _this.lhp_set1(obj_);
          
          
      }catch (err){
console.log("err",err)
      }
  
//类型为清空数据
}else if(data_type=="clear"){
  _this.lhp_set1(obj_);
  if(path_lst[path_lst.length-1]=='info'){
      let objxxx=_this.data.fast_vue_data[ddd].$refs['ref_obj'].data.info;

      // console.log("######objxxx######### 111",JSON.parse(JSON.stringify(objxxx)))
      for (let key in objxxx) {
          if (objxxx.hasOwnProperty(key) && key !== 'version') {
          delete objxxx[key];
          }
      }
      // console.log("######objxxx######### 222",JSON.parse(JSON.stringify(objxxx)))
  return
}
  return
  let change_obj=_this.data.data;
  let last_key=null;
  if (path.indexOf(".") !== -1){
      let path_lst=path.split(".");
      for (let i=0;i<path_lst.length-1;i++){change_obj=change_obj[path_lst[i]]}
      last_key=path_lst[path_lst.length-1];
  }else{
      last_key=path;
  
  }
  let temp_val=change_obj[last_key]
switch (typeof temp_val) {  
      case 'object':  
          // 注意：这里会匹配到null，因为null也是object类型  
          // 需要额外检查是否为null  
          if (temp_val === null) {  
              change_obj[last_key] = null; // 或者你可以将null也设置为{}  
          } else if (Array.isArray(temp_val)) {  
              change_obj[last_key] = [];  
          } else {  
              change_obj[last_key] = {};  
          }  
          break;  
      case 'string':  
      change_obj[last_key] = '';  
          break;  
      case 'number':  
      change_obj[last_key] = 0;  
          break;  
      case 'boolean':  
      change_obj[last_key] = false;  
          break;  

}


}else if(data_type=='insert'){
  // let before_idx=obj_.before_idx;
  let change_obj=_this.data.data;
  // let last_path=null;
  // console.log("insert检查-1 obj_",obj_)
  // console.log("insert检查 前data",JSON.parse(JSON.stringify(_this.data.data)))
  if (path.indexOf(".") !== -1){
      let path_lst=path.split(".");
      for (let i=0;i<path_lst.length-1;i++){change_obj=change_obj[path_lst[i]]}
      last_path=path_lst[path_lst.length-1];
  }else{last_path=path}
  change_obj[last_path]=JSON.parse(JSON.stringify(data));
  //类型为删除
  }
}
_this.data.add_open_dict_and_open=function(obj_){
  _this.data._add_open_dict_and_open(obj_);
}
_this.reset_info=function(){
    if(!_this.data.解析后的数据结构){
      console.log("开始解析数据结构:",_this.deepcopy_data.data_info)
      let only_id=_this.deepcopy_data.__only_id;
      let check_md5=md5(JSON.stringify(_this.deepcopy_data.data_info));
      console.time('解析- 结构   耗时:');
       
      if(a_1_0_4_6_1_md5_val[only_id] && a_1_0_4_6_1_md5_val[only_id].md5==check_md5){
          _this.data.解析后的数据结构=a_1_0_4_6_1_md5_val[only_id].data;
      }else{
          _this.data.解析后的数据结构=a_1_0_4_6_1_解析多层数据结构(_this.deepcopy_data.data_info);
      }
      a_1_0_4_6_1_md5_val[only_id]={
          md5:check_md5,
          data:JSON.parse(JSON.stringify(_this.data.解析后的数据结构))
      }
      console.timeEnd('解析- 结构   耗时:');
      console.time('解析- 数据   耗时:');
      _this.data.解析后的数据=a_1_0_4_6_1_解析数据(_this.deepcopy_data.copy_data,_this.data.解析后的数据结构);
      console.timeEnd('解析- 数据   耗时:');
    }

}
//展开目录
_this.data._open=async function(path){
    _this.reset_info();
  //初始化节点的打开信息 以及当前节点的打开数量
  if (_this.data.open_dict_init==false){
      //初始化父节点到快速查找对象中
      _this.data.fast_data[null]=_this.$refs.father;
      _this.data.fast_data['']=_this.$refs.father;
      _this.data.open_dict=_this.data.解析后的数据;//初始化父dom到快速查找字典中
      _this.data.open_dict_init=true;
      // console.log("open_dict",_this.data.open_dict);
  }
  let open_dct=_this.data.open_dict;
  let sort_lst=[];//要排序的列表
  let sort_dct={};
  let father_dom__=_this.$refs.father;
  let father_dom=_this.data.fast_data[path];
  if(path!=''&&path!=null){
      ttime3(_this.data.fast_vue_data[path],'ref_obj',_this.data.set_open,func2_lst=[_this.data.fast_vue_data[path]]);//打开
  }
  // console.log("father_dom__",father_dom__)
  // 创建一个 DocumentFragment  
  // let fragment = document.createDocumentFragment();  
  // console.log("开始展开,展开路径:",path)
  //通过path解析路径
  let obj=_this.data.解析后的数据;
  let path_lst=path.split(".");
  let space=(path_lst.length-1)*8;
  if (path==''){space=-8}
  // console.log("now space:",path_lst,space)
  if (path==''){path_lst=[]}
  for (let i=0;i<path_lst.length;i++){
      obj=obj.dict[path_lst[i]];
      open_dct=open_dct.dict[path_lst[i]];
  
  }
  //打开当前dom
  open_dct.close=false;
  /*console.log("打开当前dom:",path)*/
  let lst=[{
              "path":path,//父节点的路径
              "insert_id":null,//要插入节点的节点id
              fast_obj:obj,//父节点的 的对象
              'space':space,//缩进位数
              'open_num':0,//当前展开层数
              'open_dct':open_dct
          }];
          // console.log("open 3")
  while (lst.length){
      let temp_lst=null;temp_lst_length=null;now_id=null;new_fast_obj=null;new_father_path=null;
      let new_dom=null;new_vue=null;t_deepcopy_data=null;new_fast_obj_base_info=null;vue_name=null;
      let lst_item=lst.pop();
      let new_path=lst_item['path'];//父节点key 用于获取父节点dom
      let fast_obj=lst_item['fast_obj'];//当前节点的dict
      let now_dict=fast_obj.dict;//当前节点下的子节点的dicts
      let insert_id=lst_item['insert_id'];
      let now_open_num=lst_item['open_num'];//当前展开层数
      let now_open_dct=lst_item['open_dct'];
      // console.log("open 4")
      //将当前节点 插入dom中
      if (insert_id==null ){//如果是要展开的节点 那么不创建dom，仅赋值变量
        //   console.log("open 5-1")
          if(path==''){
              //父节点快速查找路径
              new_father_path=null;}
          else{new_father_path=path}
          // console.log("open 5-12")
          new_fast_obj=fast_obj;
      }
      else{
          // console.log("open 5-2")
          new_fast_obj_base_info=new_fast_obj=now_dict[insert_id];
          // console.log("open 5-22")
          if (new_fast_obj_base_info){
            let tttype=new_fast_obj_base_info.type;
            vue_name='a_1_0_4_6_1_'+new_fast_obj_base_info.type+"_line"
              t_deepcopy_data=JSON.parse(JSON.stringify(new_fast_obj_base_info))||{};
            //   console.log("t_deepcopy_data",JSON.parse(JSON.stringify(new_fast_obj_base_info)))
          }else{
              vue_name="a_1_0_4_6_1_str_lines";
              t_deepcopy_data={};
          }
          // console.log("open 5-23")
          //获取当前节点
          if(new_path==null){
              // if (path==null){
              //     new_father_path=insert_id+'';
              // }else{
                  new_father_path=insert_id+'';
              // }
          }else{
              new_father_path=new_path+'.'+insert_id;
          }

          //新建一个dom
          new_dom=document.createElement(vue_name);
          //设置dom属性 ref值为ref_obj
          new_dom.setAttribute('ref', 'ref_obj');
          t_deepcopy_data['_space_']=lst_item.space;//退格
          t_deepcopy_data['path']=new_father_path;
          t_deepcopy_data['father_data']=_this.data.father_data;
          t_deepcopy_data['father_data2']=_this.data;
          
          /*console.log("??????t_deepcopy_data",t_deepcopy_data,_this.data.tree_data)*/
          t_deepcopy_data['click_handle']=_this.data.click_handle;
          new_dom.setAttribute(':deepcopy_data',"deepcopy_data");//初始化vue模板的参数
          new_dom.setAttribute('dom_path',new_father_path);//初始化vue模板的参数

          sort_lst.push(new_father_path);
          sort_dct[new_father_path]={'el':new_dom,data:{true:true,false:false,null:null,deepcopy_data:t_deepcopy_data}}
          //检查当前节点是否处于展开状态 如果未展开 则跳过添加子节点
        //   console.log("//检查当前节点是否处于展开状态 如果未展开 则跳过添加子节点",lst_item,now_open_dct)
          if(now_open_dct.close==false){
              // console.log("flase?:",new_father_path,now_open_dct)
              t_deepcopy_data['close']=false;
          }
      }

      //检查当前节点是否处于展开状态 如果未展开 则跳过添加子节点
      if(now_open_dct.close==true){continue}
      // // if ()
      // //如果当前达到展开上限 则停止展开后续的子节点
      // if (now_open_num>=max_open_type){
      //     continue
      // }else{//设置为展开状态
      //     _this.data.fast_vue_data[new_father_path];
      //     if(new_father_path!=null){
      //         // console.log("_this.data.fast_vue_data[new_father_path],",_this.data.fast_vue_data[new_father_path],_this.data.fast_vue_data)
      //         ttime3(_this.data.fast_vue_data[new_father_path],'ref_obj',_this.data.set_open,func2_lst=[_this.data.fast_vue_data[new_father_path]]);//打开

      //     }
      // }
      // console.log("fast_obj.dict && Object.keys(fast_obj.dict).length",fast_obj.dict && Object.keys(fast_obj.dict).length,fast_obj.dict)

      //遍历子节点 将子节点添加进待处理队列中new_fast_obj
      if (new_fast_obj.dict && Object.keys(new_fast_obj.dict).length){
          // temp_lst=(Object.keys(fast_obj.dict).map(Number)).sort((a,b)=>b-a);
          temp_lst=(Object.keys(new_fast_obj.dict).map(Number)).sort((a,b)=>b-a);
          // console.log("temp_lst",temp_lst)
          temp_lst_length=temp_lst.length;
          if (!temp_lst_length){continue}
      }else{continue}
      //遍历子节点 倒序添加进处理队列
      // for (let i=temp_lst_length-1;i>=0;i--){
      for (let i=0;i<temp_lst_length;i++){
          now_id=temp_lst[i];
          lst.push({
              path:new_father_path,
              insert_id:now_id,
              fast_obj:new_fast_obj,
              space:lst_item.space+8,
              'open_num':now_open_num+1,//当前展开层数
              open_dct:now_open_dct.dict[now_id]
          })
      }
      // console.log("temp_lst加入队列中:",temp_lst,JSON.parse(JSON.stringify(lst)))


  }
  // sort_lst.sort();//排序 ['1.1', '1.1.1', '1.2', '2.1', '2.2']
  let sort_lst2=[];
  // let sort_lst2=sort_lst;
  // console.log("sort_lst",sort_lst)
  while (sort_lst.length){ sort_lst2.push(sort_lst.pop());}
  let count_max=40;count_start=0;
  let fragment = document.createDocumentFragment(); //创建虚拟节点
  let next_dom=father_dom;
  let next_dom2=father_dom;
  // console.log("sort_lst2",father_dom__,next_dom,sort_lst2)
  while (sort_lst2.length){
      //等待页面刷新完成
      if ((count_start++)%count_max==0){
          _this.insertAfter(fragment,next_dom,father_dom__);
          await _this.sleep(16);
          fragment = document.createDocumentFragment(); //创建虚拟节点
          next_dom=next_dom2;
          // console.log("next_dom",next_dom)
          // father_dom__.appendChild(fragment);

      }
      let new_path=sort_lst2.pop();
      let vue_dct=sort_dct[new_path];
      // console.log("newpath",new_path,vue_dct)
      let new_dom=vue_dct.el;
      // _this.insertAfter(new_dom,fragment,fragment);
      fragment.appendChild(new_dom);
              //  father_dom__.appendChild(new_dom);
               
              // _this.insertAfter(new_dom,father_dom,father_dom__);
      let new_vue=new Vue(vue_dct);
      // window.test_vue=new_vue;
      _this.data.fast_data[new_path]=new_vue.$el;
      next_dom2=new_vue.$el;
      _this.data.fast_vue_data[new_path]=new_vue;
  }
  
  _this.insertAfter(fragment,next_dom,father_dom__);
  // console.log("sort_lst",sort_lst);
  // console.log("...",fragment)
}
_this.data.open=async function(path){
  
  window.a_1_0_4_6_1_timer_start({
      func:_this.data._open,
      params:path
  })
}
_this.data.open('');
_this.data._close=async function(path){

  // parent.removeChild(nodeA.nextSibling); // 这里直接删除也可以，但为演示添加到数组后再删除  
  let test_count1=0;
  let open_dct=_this.data.open_dict;
  let sort_lst=[];//要排序的列表
  let sort_dct={};
  let father_dom__=_this.$refs.father;
  let father_dom=_this.data.fast_data[path];
  // console.log("father_dom__",father_dom__)
  // 创建一个 DocumentFragment  
  // let fragment = document.createDocumentFragment();  
  // console.log("开始展开,展开路径:",path)
  //通过path解析路径
  let obj=_this.data.open_dict;
  let path_lst=path.split(".");
  let space=(path_lst.length-1)*8;
  if (path==''){space=-8}
  // console.log("now space:",path_lst,space)
  if (path==''){path_lst=[]}
  for (let i=0;i<path_lst.length;i++){
      obj=obj.dict[path_lst[i]];
      open_dct=open_dct.dict[path_lst[i]];
  
  }
  let lst=[{
              "path":path,//父节点的路径
              "insert_id":null,//要插入节点的节点id
              fast_obj:obj,//父节点的 的对象
              'space':space,//缩进位数
              'open_num':0,//当前展开层数
              'open_dct':open_dct
          }];
    console.log("close 1")
          // console.log("open 3")
  while (lst.length){
      let temp_lst=null;temp_lst_length=null;now_id=null;new_fast_obj=null;new_father_path=null;
      let new_dom=null;new_vue=null;t_deepcopy_data=null;new_fast_obj_base_info=null;vue_name=null;
      let lst_item=lst.pop();
      let new_path=lst_item['path'];//父节点key 用于获取父节点dom
      let fast_obj=lst_item['fast_obj'];//当前节点的dict
      let now_dict=fast_obj.dict;//当前节点下的子节点的dicts
      let insert_id=lst_item['insert_id'];
      let now_open_num=lst_item['open_num'];//当前展开层数
      let now_open_dct=lst_item['open_dct'];
      // console.log(lst_item,new_path,fast_obj,now_dict,insert_id,now_open_num,now_open_dct,'xxx')
      // console.log("open 4")
      //将当前节点 插入dom中
      if (insert_id==null ){//如果是要展开的节点 那么不创建dom，仅赋值变量
          // console.log("open 5-1")
          if(path==''){
              //父节点快速查找路径
              new_father_path=null;}
          else{new_father_path=path}
          // console.log("open 5-12")
          new_fast_obj=fast_obj;
      }
      else{
          // console.log("open 5-2")
          // console.log("new_path",new_path,insert_id)
          // console.log("new_fast_obj",now_dict,insert_id)
          new_fast_obj=now_dict[insert_id];
          // console.log("open 5-23")
          //获取当前节点
          if(new_path==null){
              // if (path==null){
              //     new_father_path=insert_id+'';
              // }else{
                  new_father_path=insert_id+'';
              // }
          }else{
              new_father_path=new_path+'.'+insert_id;
          }

          sort_lst.push(new_father_path);
      }

      //检查当前节点是否处于展开状态 如果未展开 则跳过添加子节点
      // console.log("now_open_dct",now_open_dct)
    //   console.log("new_path",new_path,now_open_dct)
      if(now_open_dct.close==true){continue}
      //遍历子节点 将子节点添加进待处理队列中
      if (new_fast_obj.dict && Object.keys(new_fast_obj.dict).length){
          // temp_lst=(Object.keys(fast_obj.dict).map(Number)).sort((a,b)=>b-a);
          temp_lst=(Object.keys(new_fast_obj.dict).map(Number)).sort((a,b)=>b-a);
          // console.log("temp_lst",temp_lst)
          temp_lst_length=temp_lst.length;
          if (!temp_lst_length){continue}
      }else{continue}
      // console.log("new_father_path add",new_father_path,temp_lst)
      //遍历子节点 倒序添加进处理队列
      // for (let i=temp_lst_length-1;i>=0;i--){
          test_count1=test_count1+temp_lst_length;
        //   console.log(`当前处理数量:${temp_lst_length}/${test_count1}`,temp_lst,new_fast_obj.dict)
      for (let i=0;i<temp_lst_length;i++){
          // console.log("添加入",now_open_dct,now_id,open_dct[now_id])
          now_id=temp_lst[i];
          lst.push({
              path:new_father_path,
              insert_id:now_id,
              fast_obj:new_fast_obj,
              'open_num':now_open_num+1,//当前展开层数
              open_dct:now_open_dct.dict[now_id]
          })
      }
      // console.log("temp_lst加入队列中:",temp_lst,JSON.parse(JSON.stringify(lst)))


  }
  console.log("close 2")
  // console.log("del lst:",JSON.parse(JSON.stringify(sort_lst)))
  let count_max=2330;count_start=0;
  while (sort_lst.length){
      //等待页面刷新完成
      if ((count_start++)%count_max==0){
          await _this.sleep(20);
      }
      let new_path=sort_lst.pop();
      father_dom__.removeChild(_this.data.fast_data[new_path]);
      // array.splice(indexToRemove, 1);  
      delete _this.data.fast_data[new_path];  
      delete _this.data.fast_vue_data[new_path];  
  }
  
  console.log("close 3")
  //关闭当前dom
  open_dct.close=true;
  
  console.log("close 4")
  // console.log("关闭当前dom:")
  // console.log("close !",open_dct)
  if(path!=''&&path!=null){
      ttime3(_this.data.fast_vue_data[path],'ref_obj',_this.data.set_close,func2_lst=[_this.data.fast_vue_data[path]]);//打开
  }
}

_this.data.close=async function(path){
  
  window.a_1_0_4_6_1_timer_start({
      func:_this.data._close,
      params:path
  })

}

}
}
);

Vue.component2('a_1_0_4_6_1_no_edit', {  
    template: `
<div class="a_1_0_4_6_1_no_edit_show_1" v-show="show_flag"><div style="font-weight: bold;">属性转移至属性容器编辑</div></div>
  `,  
  props:{"show_flag":false},

data() {
    return {
    flag: this.show_flag
    };
},
watch: {
    show_flag(newVal) {
    this.flag = newVal;
    }
}
  } 
  );


Vue.component2('a_1_0_4_6_1', {  
  template: `<div style="width:100%;height:100%;
min-width: 300px;" v-show="data.show_flag" :key="refresh">
    <div class="a_1_0_4_6_1_title">
        <div style="color:#bcbcbc">
            前端组件属性编辑框
        </div>
    </div>
    <a_1_0_4_6_1_menu2 ref="menu" :deepcopy_data="deep_menu" :key="refresh_menu">
    </a_1_0_4_6_1_menu2>
    <!-- ------------这里是显示属性内容的--------start--------- -->
    <div v-show="show_0" :key="show_0_key">
        <div class="a_1_0_4_6_1_container" @click="show_all">
        <button type="button" class="a_1_0_4_6_1_button_class">
  全屏编辑模式：{{show_all_flag}}
 </button></div>
        <div class="a_1_0_4_6_1_container" @click="edit_flag_all">
        <button type="button" class="a_1_0_4_6_1_button_class">
  全局辅助开关：{{edit_flag_all_flag}}
</button></div>
    
        <div class="a_1_0_4_6_1_container"><div class="a_1_0_4_6_1_left">
        组件名称【组件id】</div><div class="a_1_0_4_6_1_right">
        {{temp_data.deepcopy_data.name}}【{{data.temp_id}}】</div></div>

        <div class="a_1_0_4_6_1_container"><div class="a_1_0_4_6_1_left">
        组件模板名【版本名】</div><div class="a_1_0_4_6_1_right">
        {{temp_data.name}}【{{temp_data.version_name}}】</div></div>
        
        <div class="a_1_0_4_6_1_container"><div class="a_1_0_4_6_1_left">
        组件模板id</div><div class="a_1_0_4_6_1_right">
        {{temp_data.temp_id}}_{{temp_data.version}}</div></div>


        <div class="a_1_0_4_6_1_container"><div class="a_1_0_4_6_1_left">
        属性移至属性容器【{{temp_data.data2father.name}}=>{{temp_data.data2father.father_id}}】</div><div class="a_1_0_4_6_1_right">
            <select v-model="temp_data.data2father.flag2"  class="a_1_0_4_6_1_right a_1_0_4_6_1_input_css" @change="up_data2father">
                <option value="false">False</option>
                <option value="true">True</option>
            </select>
        </div>
        </div>


        <!-- ------------dict类-------end--------- -->
        <div class="a_1_0_4_6_1_container2" ref="dict">
        </div>
    </div>
    <!-- ------------这里是显示属性内容的-------end--------- -->
    <!-- ------------这里是显示自定义css内容的-------start--------- -->
    <div v-show="show_1" :key="show_1_key">
        <div class="a_1_0_4_6_1_container"><div class="a_1_0_4_6_1_left">
        组件标识[css id]</div><div class="a_1_0_4_6_1_right">
        {{当前项目_当前页面_当前组件_id}}</div></div>
        
        <textarea id="textEditor" class="editor" placeholder="输入自定义数据" style="width: 100%;"></textarea>
        <div class="buttons">
            <button id="restoreButton" class="button disabled">恢复</button>
            <button id="submitButton" class="button disabled">提交</button>
        </div>
    </div>
    <!-- ------------这里是显示自定义css内容的-------end--------- -->
    <!-- ------------这里是显示自定义js内容的-------start--------- -->
    <div v-show="show_2"  :key="show_2_key">
        <div class="a_1_0_4_6_1_container"><div class="a_1_0_4_6_1_left">
        组件标识[css id]</div><div class="a_1_0_4_6_1_right">
        {{当前项目_当前页面_当前组件_id}}</div></div>
        <textarea class="a_1_0_4_6_1_editor" placeholder="输入自定义数据"></textarea>
        <div class="a_1_0_4_6_1_buttons">
            <button id="restoreButton" class="a_1_0_4_6_1_button disabled">恢复</button>
            <button id="submitButton" class="a_1_0_4_6_1_button disabled">提交</button>
        </div>
    </div>
    <!-- ------------这里是显示自定义js内容的-------end--------- -->
    <el-dialog title="提示" :visible.sync="textDialogVisible" width="30%" @close="textDialogVisible = false">
        <!-- 对话框内容 -->
        <span>
            {{ dialogText }}
        </span>
        <span slot="footer" class="dialog-footer">
            <el-button @click="textDialogVisible = false">
                确 定
            </el-button>
        </span>
    </el-dialog>
</div>
`,  
data(){  
  return {  
    show_all_flag:"关闭",//前端可视化界面是否关闭
    edit_flag_all_flag:"开启",//前端辅助功能开启状态
    当前项目_当前页面_当前组件_id:'',
    dict_k:'1',
    textDialogVisible:false,
    dialogText:'',
    color_dct:{
      "固定传参":"#80847e",
      "组件传参":"#55929e",
      "配置设参":"#ab9f64"
    },
    show_1_key:'101',
    refresh_menu:'33',
    deep_menu:'',
    now_show_id:0,
    show_0:true,
    show_0_key:'0',
    show_1:false,
    show_1_key:'3',
    show_2:false,
    show_2_key:'5',
    refresh:'1',
    show_1_data:{
      process_name:'',//所属进程名称
      process_id:'',//所属进程id
      id_:'1',//组件id
      name:'',//组件名称
      temp_name:'',//组件模板名称
      version:'',//组件版本
      version_name:'',//版本名称
    },
    show_2_data:{
      data:[]
    },
    show_3_data:{
      data:[]
    },
    data:{
      temp_id:'null',
      old_md5:'',
      now_select:'',//当前选择的   1_1表示 第一个页面的第一个组件 
      key:'',
      id:'',
      show_flag:false,

      //组件数据格式

      //组件数据



    },
    temp_data:{
      data_info:{},
      deepcopy_data:{
        name:"",//组件名称
      },
      data2father:{"name":" _ ","flag":false,"flag2":false,father_id:""},
      name:"",//组件模板名
      vue_name:"a_1_0_1_1",//组件模板id
      version: 1,//组件模板版本
      version_name:'',//模板版本名称
      temp_id:"",
      
    }//组件数据
  }    

},
watch:{
'data.now_select':function(e){
  console.log("开始选择")
  let _this=this;
  let select_lst=_this.data.now_select.split("_");
  _this.data.page_id=select_lst[0];//页面id
  _this.data.temp_id=select_lst[1];//组件id
  //开始获取当前组件的数据
  _this.all_temp_data=_this.data.全局配置对象.update_obj.data.page_config.dict[1].dict[_this.data.page_id].dict[1].page_dict;
  _this.temp_data=_this.all_temp_data[ _this.data.temp_id].base_info;
  let 项目信息=_this.getQueryParams(); 
  _this.当前项目_当前页面_当前组件_id=`id_${项目信息.项目所有者id}_${项目信息.项目目录id}_${项目信息.项目id}_${_this.data.page_id}_${_this.data.temp_id}`;

  _this.data._刷新dict();
},
'data.show_flag':function(e){
  let _this=this;
  if(!_this.__init__x){
    try{
      _this.$refs.menu.data.set_menu({
        menu_id:0,
        menu_name:'属性',
        menu_class:'icon iconfont icon-shuxing', 
        func:_this.data.show_menu_func   
      })
      
      _this.$refs.menu.data.set_menu({
        menu_id:1,
        menu_name:'css',
        menu_class:'icon iconfont icon-rucan', 
        func:_this.data.show_menu_func       
      })
      
      _this.$refs.menu.data.set_menu({
        menu_id:2,
        menu_name:'js',
        menu_class:'icon iconfont icon-chucan', 
        func:_this.data.show_menu_func     
      })
    }catch{}
    
    _this.__init__x=true;
  }
},
},
methods:{
    show_all:function(){
        let _this=this;
        if(_this.show_all_flag=="开启"){
            _this.show_all_flag="关闭";
            前端可视化编辑界面.退出全屏();
        }else{
            _this.show_all_flag="开启";
            前端可视化编辑界面.设置全屏();
        }
    },
    edit_flag_all:function(){
        let _this=this;
        if(_this.edit_flag_all_flag=="开启"){
            _this.edit_flag_all_flag="关闭";
            前端可视化编辑界面.关全局辅助();
        }else{
            _this.edit_flag_all_flag="开启";
            前端可视化编辑界面.开全局辅助();
        }
    },
    //拥有返回目标id  未拥有返回-1
    check_data_father:function(){
        let _this=this;
        let temp_id=_this.data.temp_id;//获取当前组件的id
        //循环遍历组件id  查找拥有father_data属性的 父容器id
        while ((temp_id+'')!='-1'){
            let check_data=_this.all_temp_data[temp_id];
            temp_id=check_data.base_info.father_id;
            if(temp_id+''=='-1'){break}
            console.log("###",temp_id,_this.all_temp_data)
            if(_this.all_temp_data[temp_id].base_info.father_data){
                break;
            }
        }
        return temp_id
    },
    //设置组件
    up_data2father:function(){
        let _this=this;
        let flag=this.temp_data.data2father.flag2;
        console.log("将组件的属性 设置转移至父容器",flag);
        if(flag=='false'){
            this.no_edit.$refs.ref_obj.flag=false;
            this.temp_data.data2father.flag=false;
            //判断自身是否是false 如果是false则不作多余操作
            if(this.temp_data.data2father.flag==false){return}
            else{
                _this.del_data2father2();
            }   
        }else{
            //判断自身是否是true 如果是则不作多余操作

            if(this.temp_data.data2father.falg==true){return}
            else{
                //首先循环遍历 判断有没有属性容器 组件作为父容器
                let father_id=this.check_data_father();
                if (father_id=='-1'){
                    this.temp_data.data2father.flag2=false;
                    this.temp_data.data2father.flag=false;
                    _this.$message({"type":"error","message":"上层节点不存在属性容器,无法设置"});
                    return
                }
                    _this.$prompt('设置父容器的属性名', '提示', {
                        confirmButtonText: '确定',
                        cancelButtonText: '取消',
                    }).then(({ value }) => {
                        
        try{
            _this.up_data2father2(value,father_id);
        }catch (err){
            console.log("err"+err)
        }
                        
                    }).catch(() => {
                        _this.$message({
                        type: 'info',
                        message: '取消输入'
                        });       
                    });
            }
        }
    },
    del_data2father2:function(){

        let _this=this;
        //获取当前的name
        let now_name=_this.all_temp_data[_this.data.temp_id].base_info.data2father.name;
        let father_id=_this.all_temp_data[_this.data.temp_id].base_info.data2father.father_id;
        let father_data=_this.all_temp_data[father_id];
        let idx1=0,idx2=0;
    let t___=father_data.base_info.data_info;
        for(idx1=0;idx1<t___.length;idx1++){
        if (t___[idx1].name=='__father_data'){
            for (idx2=0;idx2<t___[idx1].dict.length;idx2++){
                if(t___[idx1].dict[idx2].name==now_name){
                    break;
                }
            }
            break;
        
        }
        }
        let temp_data={};
        //当前节点数据
        temp_data[_this.data.temp_id]={base_info:{data2father:{flag:false,flag2:false,name:"",father_id:""}}};
        let update_val={
          "type":"change_data",
          "type2":"取消_前端属性移至属性容器",
          'page_id':_this.data.page_id,
          'temp_id':_this.data.temp_id,
          "father_id":father_id,
          'now_select':_this.now_select,
          "path":"page_config.dict.1",
          "data_type":"set_list",//类型 修改数据
          "postput":[
            {
              'path':`page_config.dict.1.dict.${_this.data.page_id}.dict.1.page_dict`,
              'data':temp_data
            },
        
        ],
        "delete":[
            {"path":`page_config.dict.1.dict.${_this.data.page_id}.dict.1.page_dict.${father_id}.base_info.data_info.${idx1}.dict.${idx2}`},
            {"path":`page_config.dict.1.dict.${_this.data.page_id}.dict.1.page_dict.${father_id}.base_info.data.__father_data.${now_name}`},
        ]
        }
        this.temp_data.data2father.falg2=false;
        _this.data.全局配置对象.更新(update_val); 
    },
    up_data2father2:function(name,father_id){
        let _this=this;
        let new_name= name+"_"+_this.data.temp_id;
        let create_data={};
        create_data[new_name]=JSON.parse(JSON.stringify(_this.temp_data.data));
        let create_data_info_len=0,idx=0;
        let father_data=_this.all_temp_data[father_id];
    let t___=father_data.base_info.data_info;
        for(idx=0;idx<t___.length;idx++){
        if (t___[idx].name=='__father_data'){create_data_info_len=t___[idx].dict.length;break;}
        }
        let create_data_info={
            name: new_name,//组件id
            ch_name: "",
            note: "",
            type: "dict2",
            dict:JSON.parse(JSON.stringify(_this.temp_data.data_info))
          };
        let temp_data={};
        //当前节点数据
        temp_data[_this.data.temp_id]={base_info:{data2father:{flag:true,flag2:true,name:new_name,father_id:father_id}}};
        //父组件数据
        temp_data[father_id]={
            base_info:{
                data:{__father_data:create_data},
            }
        }
        let update_val={
          "type":"change_data",
          "type2":"前端属性移至属性容器",
          'page_id':_this.data.page_id,
          'temp_id':_this.data.temp_id,
          "father_id":father_id,
          'now_select':_this.now_select,
          "path":"page_config.dict.1",
          "data_type":"set_list",//类型 修改数据
          "postput":[
            {
              'path':`page_config.dict.1.dict.${_this.data.page_id}.dict.1.page_dict`,
              'data':temp_data
            },
            {
              'path':`page_config.dict.1.dict.${_this.data.page_id}.dict.1.page_dict.${father_id}.base_info.data_info.${idx}.dict.${create_data_info_len}`,
              'data':create_data_info
            },
        
        ],
        }
        this.temp_data.data2father.falg2=false;
        _this.data.全局配置对象.更新(update_val); 
    },
  updateProperty:function(name,value){
    let _this=this;
    console.log("修改属性",name,value);
    let change_data={};
    change_data[name]=value;

    let update_val={
      "type":"change_data",
      "type2":"更新前端组件属性",
      'page_id':_this.data.page_id,
      'temp_id':_this.data.temp_id,
      "name":name,
      "value":value,
      'now_select':_this.now_select,
      "path":"page_config.dict.1",
      "data_type":"set_list",//类型 修改数据
      "postput":[
        {
          'path':`page_config.dict.1.dict.${_this.data.page_id}.dict.1.page_dict.${_this.data.temp_id}.base_info.deepcopy_data`,
          'data':change_data
        }],
    }
    _this.data.全局配置对象.更新(update_val);
  }
},

mounted:function(){
    _this.getQueryParams=function() {  
        if(!_this.data.项目信息){
            const queryParams = {};  
            const urlParams = new URLSearchParams(window.location.search);  
            for (const [key, value] of urlParams.entries()) {  
                queryParams[key] = value;  
            }  
            let 项目所有者id=queryParams.user_id;
            let 项目目录id=queryParams.project_dir;
            let 项目id=queryParams.project_id; 
            _this.data.项目信息={项目所有者id,项目目录id,项目id}; 
        }

            return _this.data.项目信息
    }  

  _this.data.show_menu_func=function(menu_id){
    if(_this.now_show_id==menu_id){return}
    else{
      //显示数据
      _this['show_'+_this.now_show_id]=false;
      _this.now_show_id=menu_id;
      _this['show_'+_this.now_show_id]=true;
      //刷新数据
      let v1=(_this.now_show_id*2)+'',v2=(_this.now_show_id*2+1)+'';
      let show_k='show_'+_this.now_show_id+'_key';
      _this[show_k]==_this[show_k]==v1?v2:v1;
    }
  }
    _this.data._刷新dict=function(){
        
        _this.$refs.dict.innerHTML=''
  let vue_name='a_1_0_4_6_1_dict';//要渲染的vue模板名称
  let new_dom=document.createElement(vue_name);
  new_dom.setAttribute('ref', 'ref_obj');
  let t_deepcopy_data={'copy_data':_this.temp_data.data,'data_info':_this.temp_data.data_info,'__only_id':_this.当前项目_当前页面_当前组件_id,'father_data':_this.data};
  new_dom.setAttribute(':deepcopy_data',"deepcopy_data");//初始化vue模板的参数
  let vue_dct={'el':new_dom,data:{true:true,false:false,null:null,deepcopy_data:t_deepcopy_data}}
  _this.$refs.dict.appendChild(new_dom);
  _this.old_dict_vue=new Vue(vue_dct);


  vue_name='a_1_0_4_6_1_no_edit';//要渲染的vue模板名称
  new_dom=document.createElement(vue_name);
  new_dom.setAttribute('ref', 'ref_obj');
  new_dom.setAttribute(':show_flag', 'show_flag');
  vue_dct={'el':new_dom,data:{"show_flag":_this.temp_data.data2father.flag}}
  _this.$refs.dict.appendChild(new_dom);
  _this.no_edit=new Vue(vue_dct);

    }
_this.data.协同数据处理=function(obj){
  if(obj.type2=='更新前端组件属性'){
    if (obj.page_id==_this.data.page_id && obj.temp_id==_this.data.temp_id){
      if(_this.temp_data[obj.name]!=JSON.parse(JSON.stringify(obj.value))){
        _this.temp_data[obj.name]=JSON.parse(JSON.stringify(obj.value));
      }
    }else if(obj.temp2){
        if (obj.page_id==_this.data.page_id && obj.temp2.temp_id==_this.data.temp_id){
            if(_this.temp_data[obj.temp2.name]!=JSON.parse(JSON.stringify(obj.value))){
            _this.temp_data[obj.temp2.name]=JSON.parse(JSON.stringify(obj.value));
            }
        }
    }
    // _this.show_0_key=_this.show_0_key=='1'?'0':'1';
  }else if(obj.type2=="添加前端组件属性_删除项"){
    if (obj.page_id==_this.data.page_id && obj.temp_id==_this.data.temp_id){
    _this.data._刷新dict();
    }
  }else if(obj.type2=="添加前端组件属性_新增项"){
    if (obj.page_id==_this.data.page_id && obj.temp_id==_this.data.temp_id){
    _this.data._刷新dict();
    }

  }else if(obj.type2=="前端属性移至属性容器"){
    console.log("前端属性移至属性容器1")
    if (obj.page_id==_this.data.page_id && ((obj.temp_id==_this.data.temp_id) || (_this.data.temp_id==obj.father_id))){
    _this.data._刷新dict();
    console.log("前端属性移至属性容器2")
    }
  }else if(obj.type2=="取消_前端属性移至属性容器"){
    console.log("取消_前端属性移至属性容器")
    if (obj.page_id==_this.data.page_id && ((obj.temp_id==_this.data.temp_id) || (_this.data.temp_id==obj.father_id))){
    _this.data._刷新dict();
    console.log("取消_前端属性移至属性容器")
    }
  }
}

},
}
);



function a_1_1_1_1_1_load_html() {
  let _this=this;
  _this.__test_flag=false;
  _this.type="v-show";//加载格式 
  _this._log=function(...lst){if(_this.__test_flag){console.log(...lst)}};
  _this.index=0;
  _this.now_load_ids={};
  _this.run_flag=0;
  _this.run_lst=[];
  _this.set_now_load_ids=function(idx){
      if(_this.now_load_ids[idx]){return true}
      else{_this.now_load_ids[idx]=true;return false}
  }
  _this.dom_innerhtml={};
  _this.dom_js={};
  //加载指定src的js
  _this.loadScript=function(src) {
          return new Promise((resolve, reject) => {
              let script = document.createElement('script');
              script.src = src;
  
              script.onload = () => resolve();
              script.onerror = () => reject(new Error('Script failed to load'));
              document.head.appendChild(script);
          });
      }
  
  //计时器
  _this.timer=null;
  //待处理数据列表
  _this.timer_lst=[];
  //计时器运行函数
  _this.timer_func= async function(){
      while(_this.timer_lst.length){
          let new_obj=_this.timer_lst.shift();
          let func=new_obj.func;
          if(func.constructor.name === 'AsyncFunction'){
              await func(new_obj.params);
          } else{
              func(new_obj.params);
          }
      }
      _this.timer=null;
  };
  //给计数器运行的函数添加待处理数据  如果计时器没有开启则开启计时器
  _this.timer_start=function(obj) {  
      _this.timer_lst.push(obj);
      if(_this.timer==null){
  
          _this.timer = setTimeout(_this.timer_func, 0);    // 设置计时器为开启状态  
      }
  }  
  //加载指定html内容到dom下
  _this.load=async function(idx,url,dom) {
      _this.timer_start({
          func:_this.load_func,
          params:{url,dom,idx}
      });
  }
  //删除style和script标签
  _this.removeScriptsAndStyles=function(htmlString) {
    // 使用正则表达式匹配<script>标签及其内容
    let scriptRegex = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi;
    // 使用正则表达式匹配<style>标签及其内容
    let styleRegex = /<style\b[^<]*(?:(?!<\/style>)<[^<]*)*<\/style>/gi;
 
    // 替换<script>标签及其内容为空字符串
    let noScriptsHtml = htmlString.replace(scriptRegex, '');
    // 替换<style>标签及其内容为空字符串
    let cleanHtml = noScriptsHtml.replace(styleRegex, '');
 
    return cleanHtml;
}
function toggleDirectChildrenDisplay(parentElement, attributeName, targetValue) {
  // 获取所有直接子元素节点（不包括文本节点、注释节点等）
  let children = parentElement.children;
  
  // 遍历所有直接子元素节点
  for (let i = 0; i < children.length; i++) {
    let child = children[i];
    let now_val=child.getAttribute(attributeName);
    console.log("child.getAttribute(attributeName)",now_val,targetValue,now_val==targetValue,(child.getAttribute(attributeName) == targetValue) ? 'block' : 'none')
    child.style.display = (child.getAttribute(attributeName) == targetValue) ? 'block' : 'none';//如果属性值不是数字，或者不存在该属性，则不改变display属性
    // 你可以根据需要添加额外的逻辑来处理这些情况
  }
}
  _this.load_func=async function(obj){
      let url=obj.url;
      if(url==''){
        
        _this._log('0:url为空 不执行加载操作');
        return}
      let dom=obj.dom;
      let idx=obj.idx;
      if(_this.type=='v-if'){
        //删除下所有
        dom.innerHTML='';
      }
      if(_this.set_now_load_ids(url)){//已经加载过了
        if(_this.type=='v-show'){
          toggleDirectChildrenDisplay(dom,`a_1_1_1_1_1_val`,idx);
        }else if(_this.type=='v-if'){
          let new_dom=document.createElement("div");
          new_dom.className='a_1_1_1_1_1_container';
          new_dom.setAttribute(`a_1_1_1_1_1_val`,idx);
          new_dom.innerHTML=_this.dom_innerhtml[idx];
          dom.appendChild(new_dom)
          _this._log("_this.dom_js[idx]",_this.dom_js[idx]);
          for (let script of _this.dom_js[idx]) {
            eval(script);
          }
        }
        return
      }//如果加载过 则直接跳过
      // Step 1: Fetch the HTML content using AJAX
      fetch(url)
          .then(response => response.text())
          .then(async (htmla) => {
              // Step 2: Parse the HTML and extract script srcs and link/style hrefs
              let parser = new DOMParser();
              let doc = parser.parseFromString(htmla, 'text/html');
    
              let src_a = [];
              let href_a = [];
    
              //获取当前html页面的 所有script标签的src内容
              _this._log('1:获取当前html页面的 所有script标签的src内容');
              document.querySelectorAll('script[src]').forEach(script => {
                  let src = script.getAttribute('src');
                  if (!src_a.includes(src)) {
                      src_a.push(src);
                  }
              });
              _this._log('\t要加载的src:',src_a);
              //获取当前html和页面的 所有link标签的href内容
              _this._log('2:获取当前html和页面的 所有link标签的href内容');
              document.querySelectorAll('link[href]').forEach(element => {
                  let href = element.getAttribute('href');
                  if (href && !href_a.includes(href)) {
                      href_a.push(href);
                  }
              });
              _this._log('\t要加载的href:',href_a);
              //获取当前html页面的 所有style标签的id内容
              _this._log('3:获取当前html页面的 所有style标签的id内容');
              let styleElements = document.getElementsByTagName('style');
              for (let i = 0; i < styleElements.length; i++) {
                  let styleId = styleElements[i].id;
                  if (styleId) { // 检查id是否存在（即不是null或undefined，且不是空字符串）
                      href_a.push(styleId);
                  }
                }
              //获取当前html页面的 所有script标签的id内容
              _this._log('4:获取当前html页面的 所有script标签的id内容');
              let scriptElements = document.getElementsByTagName('script');
              for (let i = 0; i < scriptElements.length; i++) {
                  let scriptId = scriptElements[i].id;
                  if (scriptId) { // 检查id是否存在（即不是null或undefined，且不是空字符串）
                      src_a.push(scriptId);
                  }
                }
                _this._log('5:获取要加载页面的 所有link标签的href内容 并且加载未加载内容');
              doc.querySelectorAll('link[href]').forEach(link => {
                  let href = link.getAttribute('href');
                  if (!href_a.includes(href)) {
                      let newLink = document.createElement('link');
                      newLink.rel = 'stylesheet';
                      newLink.href = href;
                      document.head.appendChild(newLink);
                  }
              });
    
              _this._log('6:获取要加载页面的 所有style标签 并且加载未加载内容');
              let styleCounter = 0;
              doc.querySelectorAll('style').forEach(style => {
                  let href = style.getAttribute('href');
                  if (!href && !href_a.some(existingHref => existingHref.endsWith(`_${styleCounter}`))) {
                      let newStyle = document.createElement('style');
                      newStyle.textContent = style.textContent;
                      newStyle.setAttribute('id', `${idx}_${styleCounter++}`);
                      document.head.appendChild(newStyle);
                  }
              });
              _this._log('7:获取要加载页面的 所有script标签的src内容 并且加载未加载内容');
              let scripts = doc.querySelectorAll('script[src]');
              for (let script of scripts) {
                  let src = script.getAttribute('src');
                  if (!src || !src_a.includes(src)) {
                      _this._log('\ysrc:',src);
                      await _this.loadScript(src); // 确保loadScript返回一个Promise
                      // console.log("加载",script,"完成")
                  }
              }
              // doc.querySelectorAll('script[src]').forEach(async(script) => {
              //     let src = script.getAttribute('src');
              //     if (!src || !src_a.includes(src)) {
              //         await _this.loadScript(src);
              //         console.log
              //     }
              // });
              if(_this.type=='v-show'){
                toggleDirectChildrenDisplay(dom,`a_1_1_1_1_1_val`,idx);
              }
              _this._log('8:获取要加载页面的 添加body到指定dom的innerhtml');
              _this.dom_innerhtml[idx]=_this.removeScriptsAndStyles(doc.body.innerHTML);
              let new_dom=document.createElement("div");
              new_dom.className='a_1_1_1_1_1_container';
              new_dom.setAttribute(`a_1_1_1_1_1_val`,idx);
              new_dom.innerHTML=_this.dom_innerhtml[idx];
              dom.appendChild(new_dom)
              _this._log('9:获取要加载页面的 所有script标签 并且加载未加载内容');
              let run_script=[];
              let scriptx = doc.querySelectorAll('script:not([type])');
              for (let script of scriptx) {
                  run_script.push(script.textContent);
                  eval(script.textContent);
              }
              _this.dom_js[idx]=run_script;
              _this._log("10:end");
          })
          .catch(error => {
              console.error('Error fetching or processing the HTML:', error);
          });
    }
  }
  // o=new  a_1_1_1_1_1_load_html();
  // o.load(idx,'https://www.baidu.com/',document.getElementById("test")).then(result => {}).catch(error => {});;
    
Vue.component2('a_1_1_1_1_1', {
  template: `
      <div ref="father"style="width:100%;height:100%" 
      
  :class="['a_1_1_1_1_1',
  
'ea_m-'+data.__style.__margin,
'ea_mx-'+data.__style.__margin_x,
'ea_my-'+data.__style.__margin_y,
'ea_mr-'+data.__style.__margin_right,
'ea_ml-'+data.__style.__margin_left,
'ea_mt-'+data.__style.__margin_top,
'ea_mb-'+data.__style.__margin_bottom,
'ea_p-'+data.__style.__padding,
'ea_px-'+data.__style.__padding_x,
'ea_py-'+data.__style.__padding_y,
'ea_pr-'+data.__style.__padding_right,
'ea_pl-'+data.__style.__padding_left,
'ea_pt-'+data.__style.__padding_top,
'ea_pb-'+data.__style.__padding_bottom,


  { 'a_1_1_1_1_1_move_edit_class': data.edit_move_show }, { 'a_1_1_1_1_1_move_edit_class2': data.edit_move_show&&(!drawer) },]"
      >
<v-app-bar app>
<div class="a_1_1_1_1_1_head_class"><div class="a_1_1_1_1_1_left">
    <span @click="drawer = !drawer" :class="data.icon"></span>{{data.name1}}
  </div>
  <div ref='head' 
  :class="['a_1_1_1_1_1_head', { 'a_1_1_1_1_1_edit_class1': data.__style.__edit_flag__ }]"
  >
  <slot name="head"></slot>
</div>
</div>
</v-app-bar>


<div class="drawer" :class="{ open: drawer }">
<div class="drawer-content">
<v-list-item subtitle="Vuetify">{{data.name1}}</v-list-item>
<v-divider></v-divider>
    <v-list-item
      v-for="(item, key) in data.menu_data"
      :key="key"
      link
      :title="item.name"
       @click="select_url(key)"
    >
      <!-- 你可以在这里添加更多内容，比如图标和链接 -->
      <v-icon>{{ item.icon }}</v-icon> <!-- 假设你有一个 v-icon 组件来显示图标 -->
      <span>{{ item.name }}</span>
    </v-list-item>
</div>
</div>


<!-- 应用的主要内容区域 -->
<div class="v-main__wrap" style="
    padding-top: 56px;
    background: rgb(241, 240, 238);
    height: 100%;
"ref="main">


</div>
      </div>
`,  
data() {
    return {
      drawer: false,
      data:{
          __test_flag:true,
            edit_move_show:false,
            type:"v-if",
            name1: "后台管理系统",
            icon: "icon iconfont icon-shezhi",
            menu_data: [
                {name:'设备控制',icon:'',url:'',test:[{icon:''}]},
                {name:'用户中心',icon:'',url:'',test:[{icon:''}]},
                {name:'日志中心',icon:'',url:'',test:[{icon:''}]},
            ]
      }
    };
},
watch:{
  "data.__test_flag":function(e){
    let _this=this;
    _this.load_obj.__test_flag=e;
  },
  "data.type":function(e){
    let _this=this;
    _this.load_obj.type=e;
  }
},
methods:{
  select_url:function(idx){
    let _this=this;
    _this._log("当前选择的:\n\t索引(idx):",idx,"\n\t路由(url):",_this.data.menu_data[idx].url);
    _this.load_obj.load(idx,this.data.menu_data[idx].url,_this.$refs.main).then(result => {}).catch(error => {});
    _this.drawer=false;
  },
  selectItem(component) {
      this.currentComponent = component;
    },
    // move_show:function(){
    //     this.data.edit_move_show
    // },
      //删除之前显示的插槽
      con_del:function(){
        try{
            this.old_con_dom.parentNode.removeChild(this.old_con_dom);}catch{}
      },
      //显示当前的插槽
      con_add:function(obj){
        let dom=obj.dom;
        let ref=obj.ref;
        // console.log("初始化容器","新建一个dom");
        let new_dom=document.createElement('div');
        
        new_dom.setAttribute('miaobian','1');
        new_dom.innerHTML="<div style='height:100%;width:10px;background:red;z-index: 9999;'></div>"
      if (dom !== null) {
        // console.log("在...之前插入",new_dom,dom)
        this.$refs[ref].insertBefore(new_dom, dom);
      } else {
        // 如果 child_dom 是 null，则将新元素添加到 father_dom 的末尾
        this.$refs[ref].appendChild(new_dom);
      }
      this.con_del();
      this.old_con_dom=new_dom;
      },
      //查找 要插入的组件 位于哪一个插槽
      check_slot(dom){
        while(1){
            if(dom==this.$refs.father){return null}
            else if(dom==this.$refs.head){
                console.log("return head")
                return 'head'}
            else{dom=dom.parentNode}
        }
      }
},
mounted:function(){
  //用于加载url的
_this.load_obj=new  a_1_1_1_1_1_load_html();
_this.load_obj.__test_flag=_this.data.__test_flag;
_this.load_obj.type=_this.data.type;//加载格式 
//_this.load_obj.load(idx,'https://www.baidu.com/',document.getElementById("test")).then(result => {}).catch(error => {});;
}
}
);
// 


Vue.component2('a_1_1_1_2_1', {  
    template: `
<div ref="body"  v-show="data.show_flag"
:class="['a_1_1_1_2_1',{ 'a_1_1_1_2_1_edit_class1': data.__style.__edit_flag__ },

'ea_m-'+data.__style.__margin,
'ea_mx-'+data.__style.__margin_x,
'ea_my-'+data.__style.__margin_y,
'ea_mr-'+data.__style.__margin_right,
'ea_ml-'+data.__style.__margin_left,
'ea_mt-'+data.__style.__margin_top,
'ea_mb-'+data.__style.__margin_bottom,
'ea_p-'+data.__style.__padding,
'ea_px-'+data.__style.__padding_x,
'ea_py-'+data.__style.__padding_y,
'ea_pr-'+data.__style.__padding_right,
'ea_pl-'+data.__style.__padding_left,
'ea_pt-'+data.__style.__padding_top,
'ea_pb-'+data.__style.__padding_bottom,


'a_1_1_1_2_1_direction_'+data.direction,
'a_1_1_1_2_1_align_'+data.align,
'a_1_1_1_2_1_justify_'+data.justify,
'a_1_1_1_2_1_warp_'+data.warp,
'a_1_1_1_2_1_relative_'+data.relative
]"
>
    <slot name="body"></slot>
   </div>
  `,  
  props:{var_name:null,deepcopy_data:null,show_flag:null,is_edit:null,load_url:null,title_var_name:null,load_htmlcrud_data:null,title_name:null,title_type:null,load_from_data:null,show_flag:null,load_data:null,_key:null},
  data:function(){  
  
    return {  
        data:{
          show_flag:true,
          height:"1",
          min_height:"1",
          min_width:"1",
          width:"1",
          flex_grow:" 1",
          direction: "top",//"内容对齐方式"
          align: "stretch",//"内容属性"
          justify: "start",//"整体排列方式"
          warp: false,//是否换行 子元素摆放不下是否换行
          relative: "static"
        }
        ,
    }    
  
  }, 
  watch:{
    
    'data.height':function(e){try{this.$refs.body.style.height=e}catch{}},
    'data.width':function(e){try{this.$refs.body.style.width=e}catch{}},
    'data.min_height':function(e){try{this.$refs.body.style.minHeight=e}catch{}},
    'data.min_width':function(e){try{this.$refs.body.style.minWidth=e}catch{}},
    'data.flex_grow':function(e){try{this.$refs.body.style.flexGrow=e}catch{}},
    'data.show_flag':function(ee){
      //   骨架类组件 必须的i参数 -------start------------
      // if (ee==true){this.edit_nit()}
      //   骨架类组件 必须的参数 -------end------------
    }},
    methods: {  
      //删除之前显示的插槽
      con_del:function(){
        try{this.old_con_dom.parentNode.removeChild(this.old_con_dom);}catch{}
      },
      //显示当前的插槽
      con_add:function(obj){
        let dom=obj.dom;
        // console.log("初始化容器","新建一个dom");
        let new_dom=document.createElement('div');
        if(this.data.relative=='relative'){
        }else{
            if((this.data.direction=='left')||(this.data.direction=='right')){
              new_dom.style.height="100%";
              new_dom.style.width="10px";
              new_dom.style.background="red";
              new_dom.style.zIndex="9999";

            new_dom.innerHTML="<div style='height:100%;width:10px;background:red;z-index: 9999;'></div>"
            }else{
              
            new_dom.style.height="10px";
            new_dom.style.width="100%";
            new_dom.style.background="red";
            new_dom.style.zIndex="9999";
            new_dom.innerHTML="<div  style='height:10px;width:100%;background:red;z-index: 9999;'></div>"
            }
            
        new_dom.setAttribute('miaobian','1');
          if (dom !== null) {
            // console.log("在...之前插入",new_dom,dom)
            this.$refs.body.insertBefore(new_dom, dom);
          } else {
            // 如果 child_dom 是 null，则将新元素添加到 father_dom 的末尾
            this.$refs.body.appendChild(new_dom);
          }
        }
        
      this.con_del();
      this.old_con_dom=new_dom;
      },
      //查找 要插入的组件 位于哪一个插槽
      check_slot(dom){
        return 'body';//只有body这一个插槽 返回body
      }
    },  
    mounted: function () {  
    }  
  } 
  );
  
  Vue.component2('a_1_1_1_2_1_div', {  
    template: `
<div style="width:100%;height:100%">
    <slot name="body"></slot>
</div>
  `,  
  
  } 
  );



Vue.component2('a_1_1_1_3_1', 
{    
    template: `

<div ref="body" 
:class="['row','a_1_1_1_3_1',

'ea_m-'+data.__style.__margin,
'ea_mx-'+data.__style.__margin_x,
'ea_my-'+data.__style.__margin_y,
'ea_mr-'+data.__style.__margin_right,
'ea_ml-'+data.__style.__margin_left,
'ea_mt-'+data.__style.__margin_top,
'ea_mb-'+data.__style.__margin_bottom,
'ea_p-'+data.__style.__padding,
'ea_px-'+data.__style.__padding_x,
'ea_py-'+data.__style.__padding_y,
'ea_pr-'+data.__style.__padding_right,
'ea_pl-'+data.__style.__padding_left,
'ea_pt-'+data.__style.__padding_top,
'ea_pb-'+data.__style.__padding_bottom,


{ 'a_1_1_1_3_1_edit': data.__style.__edit_flag__ },
]"

>
  <slot name="body"></slot>
</div>
  `,  
  data:function(){  
  
    return {  
        data:{
          show_flag:true,
          width:"100%",
          class1:"center"
        }
        ,
    }    
  
  }, 
  watch:{
    'data.width':function(e){try{this.$refs.body.style.width=e}catch{}},
  
  
  },
  methods: {  
    //删除之前显示的插槽
    con_del:function(){
      try{this.old_con_dom.parentNode.removeChild(this.old_con_dom);}catch{}
    },
    //显示当前的插槽
    con_add:function(obj){
      let dom=obj.dom;
      // console.log("初始化容器","新建一个dom");
      let new_dom=document.createElement('div');

      new_dom.setAttribute('miaobian','1');
      new_dom.innerHTML="<div  style='height:100%;width:10px;background:red;z-index: 9999;'></div>"
    if (dom !== null) {
      // console.log("在...之前插入",new_dom,dom)
      this.$refs.body.insertBefore(new_dom, dom);
    } else {
      // 如果 child_dom 是 null，则将新元素添加到 father_dom 的末尾
      this.$refs.body.appendChild(new_dom);
    }
    this.con_del();
    this.old_con_dom=new_dom;
    },
    //查找 要插入的组件 位于哪一个插槽
    check_slot(dom){
      return 'body';//只有body这一个插槽 返回body
    }
  }, 
    mounted: function () {  
    }  
  } 
  );
  

Vue.component2('a_1_1_1_4_1', {  
    template: `
<div ref="body"  v-show="data.show_flag" min-height="10px"

:class="[

'ea_m-'+data.__style.__margin,
'ea_mx-'+data.__style.__margin_x,
'ea_my-'+data.__style.__margin_y,
'ea_mr-'+data.__style.__margin_right,
'ea_ml-'+data.__style.__margin_left,
'ea_mt-'+data.__style.__margin_top,
'ea_mb-'+data.__style.__margin_bottom,
'ea_p-'+data.__style.__padding,
'ea_px-'+data.__style.__padding_x,
'ea_py-'+data.__style.__padding_y,
'ea_pr-'+data.__style.__padding_right,
'ea_pl-'+data.__style.__padding_left,
'ea_pt-'+data.__style.__padding_top,
'ea_pb-'+data.__style.__padding_bottom,


'col-lg-'+data.col_lg,
'col-md-'+data.col_md,
'col-sm-'+data.col_sm,
'col-'+data.col,

{ 'a_1_1_1_4_1_edit': data.__style.__edit_flag__ },
]"
   
   >

   <slot name="body"></slot>
   </div>
  `,  
data:function(){  
  
    return {  
        data:{
          show_flag:true,
          col_lg: "3",
          col_md: "4",
          col_sm: "6",
          col: "12",
        }
        ,
    }    
  
  }, 
  watch:{
    
    'data.height':function(e){try{this.$refs.body.style.height=e}catch{}},
    'data.width':function(e){try{this.$refs.body.style.width=e}catch{}},
    'data.show_flag':function(ee){
      //   骨架类组件 必须的i参数 -------start------------
      // if (ee==true){this.edit_nit()}
      //   骨架类组件 必须的参数 -------end------------
    }},
    methods: {  
      //删除之前显示的插槽
      con_del:function(){
        try{this.old_con_dom.parentNode.removeChild(this.old_con_dom);}catch{}
      },
      //显示当前的插槽
      con_add:function(obj){
        let dom=obj.dom;
        // console.log("初始化容器","新建一个dom");
        let new_dom=document.createElement('div');
        if(this.data.relative=='relative'){
        }else{
            if((this.data.direction=='left')||(this.data.direction=='right')){
              new_dom.style.height="100%";
              new_dom.style.width="10px";
              new_dom.style.background="red";
              new_dom.style.zIndex="9999";
            new_dom.innerHTML="<div  style='height:100%;width:10px;background:red;z-index: 9999;'></div>"
            }else{
              
            new_dom.style.height="10px";
            new_dom.style.width="100%";
            new_dom.style.background="red";
            new_dom.style.zIndex="9999";
            new_dom.innerHTML="<div  style='height:10px;width:100%;background:red;z-index: 9999;'></div>"
            }
            new_dom.setAttribute('miaobian','1');
          if (dom !== null) {
            // console.log("在...之前插入",new_dom,dom)
            this.$refs.body.insertBefore(new_dom, dom);
          } else {
            // 如果 child_dom 是 null，则将新元素添加到 father_dom 的末尾
            this.$refs.body.appendChild(new_dom);
          }
        }
        
      this.con_del();
      this.old_con_dom=new_dom;
      },
      //查找 要插入的组件 位于哪一个插槽
      check_slot(dom){
        return 'body';//只有body这一个插槽 返回body
      }
    },  
    mounted: function () {  
    }  
  } 
  );
  


 
  Vue.component2('a_1_1_1_6_1', {
    template: `
<div   v-show="data.show_flag" min-height="10px"

:class="[

'ea_m-'+data.__style.__margin,
'ea_mx-'+data.__style.__margin_x,
'ea_my-'+data.__style.__margin_y,
'ea_mr-'+data.__style.__margin_right,
'ea_ml-'+data.__style.__margin_left,
'ea_mt-'+data.__style.__margin_top,
'ea_mb-'+data.__style.__margin_bottom,

'col-lg-'+data.col_lg,
'col-md-'+data.col_md,
'col-sm-'+data.col_sm,
'col-'+data.col,

{ 'a_1_1_1_6_1_edit': data.__style.__edit_flag__ },
]"
   
   >
  <v-card  class="mx-auto" 
  
:class="[
'mx-auto',
'ea_m-'+data.__style.__padding,
'ea_mx-'+data.__style.__padding_x,
'ea_my-'+data.__style.__padding_y,
'ea_mr-'+data.__style.__padding_right,
'ea_ml-'+data.__style.__padding_left,
'ea_mt-'+data.__style.__padding_top,
'ea_mb-'+data.__style.__padding_bottom,
  ]"
  width="auto" :height="data.height">
      <div ref="body" style="width:100%;height:100%">
      <slot name="body"></slot>
      </div>
  </v-card>
  </div>
  `,  
  data() {
      return {
        data:{
          show_flag:true,
            width:"100%",
            height:"100%",
            
          col_lg: "3",
          col_md: "4",
          col_sm: "6",
          col: "12",
        }
      };
  },
  methods:{
    
      //删除之前显示的插槽
      con_del:function(){
        try{
            this.old_con_dom.parentNode.removeChild(this.old_con_dom);}catch{}
      },
      //显示当前的插槽
      con_add:function(obj){
        let dom=obj.dom;
        let ref=obj.ref;
        // console.log("初始化容器","新建一个dom");
        let new_dom=document.createElement('div');
        new_dom.setAttribute('miaobian','1');
        new_dom.innerHTML="<div  style='height:10px;width:100%;background:red;z-index: 9999;'></div>"
      if (dom !== null) {
        // console.log("在...之前插入",new_dom,dom)
        this.$refs[ref].insertBefore(new_dom, dom);
      } else {
        // 如果 child_dom 是 null，则将新元素添加到 father_dom 的末尾
        this.$refs[ref].appendChild(new_dom);
      }
      this.con_del();
      this.old_con_dom=new_dom;
      },
      //查找 要插入的组件 位于哪一个插槽
      check_slot(dom){
        while(1){
            if(dom==this.$refs.father){return null}
            else if(dom==this.$refs.body){
                // console.log("return body")
                return 'body'}
            else{dom=dom.parentNode}
        }
      }
  },
  mounted:function(){
  }
  }
  );
  // 
  
a_1_1_1_7_1_component_data={
  template: `
  <div :key="k">
    <div v-for="(data_info, index) in data.data" :key="index" class="a_1_1_1_7_1_row" :style="{
                                width: data.table_width,
                                height: data.body_height,
                                color: data.head_color,
                                backgroundColor: data.body_ground,
                              }">
        ###replace###
    </div>
  </div>
`,  
// template: `
//   <div :key="k">
//   <div v-for="(header, index) in data.data" :key="index" class="a_1_1_1_7_1_row" :style="{
//                               width: data.table_width,
//                               height: data.body_height,
//                               color: data.head_color,
//                               backgroundColor: data.body_ground,
//                             }">
//                       ???
//   </div>
// </div>
// `,  
data() {
    return {
      k:'1',
        data:{  
            slot_head:[
              {name:'列1',width:"100"},
              {name:'列2',width:"100"},],
            table_width:'222',
            head_height:"1",//标题高度
            head_color:"1",//标题颜色
            head_size:"1",//标签大小
            head_ground:"1",//标题背景色
            body_height:"50",//内容高度
            body_ground:"1",//内容背景色
          data:[]
        }
    };
},
methods: {
  refresh:function(){
    _this.k=_this.k=='1'?'2':'1';
  }
},
}
window.a_1_1_1_7_1_init_flag_dct={};
window.a_1_1_1_7_1_change_func=function(data){

  // slot_head:_this.deepcopy_data.slot_head||_this.data.slot_head,//列名
  // slot_data:_this.deepcopy_data.slot_data||_this.data.slot_data,//列的内容
  // __only_id:_this.deepcopy_data.__only_id||_this.data.__only_id
  let _this=this;
  _this.father_this=data._this;
  _this.slot_head=data.slot_head;//头
  _this.slot_data=data.slot_data;//身体
  _this.__only_id=data.__only_id;//组件id    id_作者id_文件夹id_项目id_页面id_组件id


  //替换component_data的数据
  _this.change=function(){
    //每个组件 封装一个
    if(!window.a_1_1_1_7_1_init_flag_dct[_this.__only_id]){
      window.a_1_1_1_7_1_init_flag_dct[_this.__only_id]=true;


      let new_dct={};
      for(let k in a_1_1_1_7_1_component_data){
        new_dct[k]=a_1_1_1_7_1_component_data[k];
      }
      // "con2_father_this":None,
      // "con2_idx":None,
      let replace_str='';
      for (let i=0;i<_this.slot_head.length;i++){
        // console.log("_this.slot_data[i]",i,_this.slot_data[i],typeof _this.slot_data[i])
        let slot_str=(_this.slot_data[i]||'').replace(/:con2_idx="con2_idx"/g,`:con2_idx="index"`);
        // console.log("_this.slot_data[i] replace",i,slot_str)
        replace_str=replace_str+`
        
<div class="a_1_1_1_7_1_cell" :style="{width: '${_this.slot_head[i].width}',height:data.body_height}" :edit_slot="index"> <div class="a_1_1_1_7_1_hid">
          ${slot_str}
</div></div>
                     
        `;
        // console.log("_this.slot_data[i] end",i)
      }
      new_dct.template=new_dct.template.replace(`###replace###`,replace_str);
      // console.log('注册组件:','a_1_1_1_7_1_'+_this.__only_id,new_dct)
      Vue.component2('a_1_1_1_7_1_'+_this.__only_id, new_dct);
    }
  }
  _this.change();

  _this.create_new=function(obj){
    let new_dom=document.createElement('a_1_1_1_7_1_'+_this.__only_id);
    new_dom.setAttribute('ref', 'ref_obj');
    new_dom.setAttribute(':deepcopy_data',"deepcopy_data");//初始化vue模板的参数
    new_dom.setAttribute(':all_set_data',"all_set_data");//初始化vue模板的参数
    new_dom.setAttribute(':con2_father_this',"con2_father_this");//初始化vue模板的参数
    console.log("data:",data)
    let vue_dct={'el':new_dom,data:{
      con2_father_this:_this.father_this,
      all_set_data:_this.father_this.all_set_data,
      deepcopy_data:{data:obj.data,
      slot_head:_this.father_this.data.slot_head,
      table_width:_this.father_this.data.table_width,
      head_height:_this.father_this.data.head_height,//标题高度
      head_color:_this.father_this.data.head_color,//标题颜色
      head_size:_this.father_this.data.head_size,//标签大小
      head_ground:_this.father_this.data.head_ground,//标题背景色
      body_height:_this.father_this.data.body_height,//内容高度
      body_ground:_this.father_this.data.body_ground,//内容背景色
    
    }}}
    console.log("data2:")
    obj.tbody.appendChild(new_dom);
    console.log("end:",vue_dct)
    return new Vue(vue_dct);
  }


}
Vue.component2('a_1_1_1_7_1', {
    template: `
                <div class="table-container" ref="father" :style="'background:'+data.body_ground+';'">
                    <div class="a_1_1_1_7_1_table" ref="t_body">
                                    <!-- 表格头部 start -->
                      <div class="a_1_1_1_7_1_row a_1_1_1_7_1_edit_class"
                          :style="{
                                    width: data.table_width,
                                    height: data.head_height,
                                    color: data.head_color,
                                    backgroundColor: data.head_ground,
                                    fontSize: data.head_size
                                  }">
                          <div class="a_1_1_1_7_1_header" v-for="(header, index) in data.slot_head" :key="index"
                              :style="{width: header.width}">{{ header.name }}</div>
                      </div>
                                    <!-- 表格头部 end -->

                                    <!-- 编辑模式下显示的数据 start -->
                      <div class="a_1_1_1_7_1_row a_1_1_1_7_1_edit_class" v-show="data.__style.__edit_flag__"   ref="edit_body"
                      
                      :style="{
                                width: data.table_width,
                                height: data.body_height,
                                color: data.head_color,
                                backgroundColor: data.body_ground,
                              }">
                        <div class="a_1_1_1_7_1_cell"  a_1_1_1_7_1="1" v-for="(header, index) in data.slot_head" :key="index" 
                        :style="{width: header.width,height:data.body_height}"
                        
                        :edit_slot="index"><div class="a_1_1_1_7_1_hid"></div></div>
                      </div>
                                    <!-- 编辑模式下显示的数据 end -->
                    </div>
                    <div class="a_1_1_1_7_1_pagination">
                        <button @click="changePage(currentPage - 1)" :disabled="currentPage === 1">上一页</button>
                        <span>{{ currentPage }} / {{ totalPages }}</span>
                        <button @click="changePage(currentPage + 1)" :disabled="currentPage === totalPages">下一页</button>
                    </div>
                </div>
  `,  
  
  data() {
      return {
        'totalRows':50,
        'perPage':50,
          currentPage: 1,
          headers: Array.from({ length: 20 }, (_, i) => `Header ${i + 1}`),
          rows: [],
          data:{
            __style:{__edit_flag__:false}, 
            slot_head:[
              {name:'列1',width:"100"},
              {name:'列2',width:"100"},],//列名
            slot_data:{},//列的内容
            body_data:[{}],
            table_width:'222',
            head_height:"1",//标题高度
            head_color:"1",//标题颜色
            head_size:"1",//标签大小
            head_ground:"1",//标题背景色
            body_height:"50",//内容高度
            body_ground:"#ffffff",//内容背景色
          }
      };
  },
  watch:{

    "data.body_data": {
      handler(newVal, oldVal) {
        // 当 body_data 发生更改时调用
        try{this.tbody_obj.$refs.ref_obj.data.data=this.data.body_data;


        }catch{}
        
        // this.f();
      },
      deep: true, // 深度监听
      immediate: false // 如果需要在组件创建时立即执行一次监听器，可以设置为 true
    },
    

    "data.slot_head": {
      handler(newVal, oldVal) {
        let width=0;
        for(let i=0;i<this.data.slot_head.length;i++){
          width=width+Number(this.data.slot_head[i].width);
        }
        console.log("新的width:",width);
        this.data.table_width=width;
        try{this.tbody_obj.data.table_width=width}catch{}
      },
      deep: true, // 深度监听
      immediate: false // 如果需要在组件创建时立即执行一次监听器，可以设置为 true
    }
  },
  computed: {
      startIndex() {
          return (this.currentPage - 1) * this.perPage;
      },
      endIndex() {
          return this.startIndex + this.perPage;
      },
      paginatedRows() {
          return this.generateRows().slice(this.startIndex, this.endIndex);
      },
      totalPages() {
          return Math.ceil(this.totalRows / this.perPage);
      }
  },
  methods: {
          //删除之前显示的插槽
          con_del:function(){
            try{
                this.old_con_dom.parentNode.removeChild(this.old_con_dom);}catch{}
          },
          con_add:function(obj){
            this.$nextTick(() => {
              this.con_add2(obj);
            })
          },
          //显示当前的插槽
          con_add2:function(obj){
            console.log("a_1_1_1_7_1显示插槽内容",obj)
            let dom=obj.dom;
            let ref=obj.ref;
            // console.log("初始化容器","新建一个dom");
            let new_dom=document.createElement('div');
            new_dom.setAttribute('miaobian','1');
            new_dom.innerHTML="<div style='height:100%;width:10px;background:red;z-index: 9999;'></div>"
          if (dom !== null) {
            this.return_slot_dom(ref).insertBefore(new_dom, dom);
          } else {
            // 如果 child_dom 是 null，则将新元素添加到 father_dom 的末尾
            this.return_slot_dom(ref).appendChild(new_dom);
          }
          this.con_del();
          this.old_con_dom=new_dom;
          },
          return_slot_dom:function(ref){
            return this.$refs['edit_body'].children[ref].children[0];
          },
          check_slot_find:function(dom){
            
            let childNodes = dom.parentNode.children;
            
            // 遍历子节点，寻找目标节点的索引位置
            let index = -1;
            for (let i = 0; i < childNodes.length; i++) {
              if (childNodes[i] === dom) {
                index = i;
                break;
              }
            }
            return index;
          },
          //查找 要插入的组件 位于哪一个插槽
          check_slot(dom){
            console.log("a_1_1_1_7_1开始匹配ref")
            while(1){
                if(dom==this.$refs.father){
                  console.log("匹配到根dom,不在可插槽位置,返回null")
                  return null}
                else if(dom==this.$refs.body){
                  console.log("匹配到中间dom,不在可插槽位置,返回null")
                  return null}
                else if(dom.getAttribute('a_1_1_1_7_1')=='1'){
                  let ref=this.check_slot_find(dom);
                  console.log("匹配插槽,返回ref:",ref)
                    // console.log("return body")
                    return ref+'';
                  
                  }
                else{dom=dom.parentNode}
            }
          },
      模拟数据() {
          return Array.from({ length: this.totalRows }, (_, i) => 
              Array.from({ length: 10 }, (_, j) => `Row ${i + 1} Col ${j + 1}`)
          );
      },
      changePage(page) {
          if (page >= 1 && page <= this.totalPages) {
              this.currentPage = page;
          }
      },
      //刷新数据
      refresh:function(new_data=null){

        let _this=this;
          // 使用 $nextTick 来等待 DOM 更新
          this.$nextTick(() => {
            // 现在 DOM 已经更新，可以安全地访问或修改 myElement
                if(new_data){this.data.body_data=new_data;}
                let tbody = this.$refs.t_body;
                let childrenArray = tbody.children; // 只保留元素节点

                // 从数组的最后一个元素向前遍历
                for (let i = childrenArray.length - 1; i >= 0; i--) {
                  let child = childrenArray[i];
                  if (!child.classList.contains('a_1_1_1_7_1_edit_class')) {
                    tbody.removeChild(child); // 删除不符合条件的节点
                  }
                }
                if(_this.data.__style.__edit_flag__==true){return}//编辑模式下不显示数据
                console.log("create1")
                _this.tbody_obj=_this.data.__slot_obj.create_new({tbody,data:_this.data.body_data});
                _this.tbody_obj.$nextTick(()=>{
                  let vue_obj=_this.tbody_obj.$refs.ref_obj;
// // 将con2 容器的子组件 在初始化的时候将this传递给con2容器 start
// _this.fast_child={};
// if(_this.con2_idx!='null'){
// let f=_this.con2_father_this.fast_child;
// if(!f[_this.con2_idx]){f[_this.con2_idx]={}}
// let f_lst=_this.deepcopy_data.__only_id.split("_");
// f[_this.con2_idx][f_lst[f_lst.length-1]]=_this;
// // 将con2 容器的子组件 在初始化的时候传递给con2容器   end
                    vue_obj.$nextTick(()=>{
                      let body_data=null;
                    if(!_this.first_refresh){
                      _this.first_refresh=true;
                      body_data=_this.deepcopy_data.body_data;
                    }else{  
                      body_data=_this.data.body_data;
                    }
                    let body_keys=Object.keys(_this.data.__father_data);
                    let new_keys={};
                    for (let i=0;i<body_keys.length;i++){
                      let k_lst=body_keys[i].split("_");
                      new_keys[k_lst[k_lst.length-1]]=body_keys[i];
                    }
                    try{
                      
                    for(let i=0;i<body_data.length;i++){
                      let data=body_data[i];
                      console.log("开始同步第",i,"条数据",new_keys,data);
                      for(let key in new_keys){
                        try{lhp_deepcopy1(_this.fast_child[i][key].data,data[key]);}catch (err){}
                        
                      }
                    }
                    }catch{}
                  })
                })
                console.log("create2")
          });
      }
  },
  
  mounted() {
    this.data.body_data = this.模拟数据();
    //计算表格宽度
    let slot_head=_this.deepcopy_data.slot_head||_this.data.slot_head;
    let width=0;
    for(let i=0;i<slot_head.length;i++){
      width=width+Number(slot_head[i].width);
    }
    _this.data.table_width=width;
    _this.data.__slot_obj=new a_1_1_1_7_1_change_func({
      slot_head:_this.deepcopy_data.slot_head||_this.data.slot_head,//列名
      slot_data:_this.deepcopy_data.slot_data||_this.data.slot_data,//列的内容
      __only_id:_this.deepcopy_data.__only_id||_this.data.__only_id,
      _this:_this
    });
    try{
      if(window.component2_edit_flag==false){
        console.log("refresh 1")
        _this.refresh();
        console.log("refresh 2")
      }

    }catch{}
  }
  }
  );



 
  Vue.component2('a_1_1_2_1_1', {
    template: `
  <v-btn :text="data.text" 
  :style="'color:'+data.font_color+'!important;background:'+data.back_color+'!important;'"
:disabled="data.disabled" elevation="16" @click="handleClick"
  
:class="[
'ea_m-'+data.__style.__margin,
'ea_mx-'+data.__style.__margin_x,
'ea_my-'+data.__style.__margin_y,
'ea_mr-'+data.__style.__margin_right,
'ea_ml-'+data.__style.__margin_left,
'ea_mt-'+data.__style.__margin_top,
'ea_mb-'+data.__style.__margin_bottom,
'ea_p-'+data.__style.__padding,
'ea_px-'+data.__style.__padding_x,
'ea_py-'+data.__style.__padding_y,
'ea_pr-'+data.__style.__padding_right,
'ea_pl-'+data.__style.__padding_left,
'ea_pt-'+data.__style.__padding_top,
'ea_pb-'+data.__style.__padding_bottom,
'ea_f-'+data.size,
'ea_h-'+data.size2,
'ea_fw-'+data.weight,
'ea_sha-'+data.shadow,

  ]"
  >
  {{data.value}}
  </v-btn>
  `,  
  data() {
      return {
        data:{
            value:'BUTTON',
            size:"",
            size2:"",
            border: "0",
            shadow: "0",
            font_color:'',
            back_color:'',
            weight:"4",
            disabled:false,
        }
      };
  },
  watch:{
    "data.size":function(e){
      this.data.size2=this.data.size;
    }
  },
  methods:{
    
    handleClick(event) {
        if(this.con2_idx!=null){
          console.log("当前父容器con2::",this.con2_father_this);
          console.log("当前idx::",this.con2_idx);
        }
        this.$emit('click');
      }
  },
  mounted:function(){
  }
  }
  );
  // 
  


 
  Vue.component2('a_1_1_2_2_1', {
    template: `
<v-divider 
  :style="'border-color:'+data.color"
  :class="['v-theme--light',
  
'ea_m-'+data.__style.__margin,
'ea_mx-'+data.__style.__margin_x,
'ea_my-'+data.__style.__margin_y,
'ea_mr-'+data.__style.__margin_right,
'ea_ml-'+data.__style.__margin_left,
'ea_mt-'+data.__style.__margin_top,
'ea_mb-'+data.__style.__margin_bottom,
'ea_p-'+data.__style.__padding,
'ea_px-'+data.__style.__padding_x,
'ea_py-'+data.__style.__padding_y,
'ea_pr-'+data.__style.__padding_right,
'ea_pl-'+data.__style.__padding_left,
'ea_pt-'+data.__style.__padding_top,

'ea_pb-'+data.__style.__padding_bottom,


'ea_bs-'+data.size,
  ]"

></v-divider>
  `,  
  data() {
      return {
        data:{
            size:"",
            color:'red',
        }
      };
  },
  methods:{
  },
  mounted:function(){
  }
  }
  );
  // 
  


 
  Vue.component2('a_1_1_2_3_1', {
    template: `
<p ref="body"
  :class="['a_1_1_2_3_1_p',
  
'ea_m-'+data.__style.__margin,
'ea_mx-'+data.__style.__margin_x,
'ea_my-'+data.__style.__margin_y,
'ea_mr-'+data.__style.__margin_right,
'ea_ml-'+data.__style.__margin_left,
'ea_mt-'+data.__style.__margin_top,
'ea_mb-'+data.__style.__margin_bottom,
'ea_p-'+data.__style.__padding,
'ea_px-'+data.__style.__padding_x,
'ea_py-'+data.__style.__padding_y,
'ea_pr-'+data.__style.__padding_right,
'ea_pl-'+data.__style.__padding_left,
'ea_pt-'+data.__style.__padding_top,
'ea_pb-'+data.__style.__padding_bottom,


'ea_f-'+data.size,
'ea_h-'+data.size2,
'ea_fw-'+data.weight,
  ]"
:style="'color:'+data.font_color+'!important;background:'+data.back_color+'!important;'"
>{{data.value}}</p>
  `,  
  data() {
      return {
        data:{
          value:'BUTTON',
          size:"",
          size2:"",
          border: "0",
          font_color:'',
          back_color:'',
          weight:"4",
        }
      };
  },
  watch:{

    'data.color':function(e){try{this.$refs.body.style.color=e}catch{}},
  },
  methods:{
  },
  mounted:function(){
  }
  }
  );
  // 
  


 
  Vue.component2('a_1_1_2_4_1', {
    template: `
<v-switch

:class="[
  
'ea_m-'+data.__style.__margin,
'ea_mx-'+data.__style.__margin_x,
'ea_my-'+data.__style.__margin_y,
'ea_mr-'+data.__style.__margin_right,
'ea_ml-'+data.__style.__margin_left,
'ea_mt-'+data.__style.__margin_top,
'ea_mb-'+data.__style.__margin_bottom,
'ea_p-'+data.__style.__padding,
'ea_px-'+data.__style.__padding_x,
'ea_py-'+data.__style.__padding_y,
'ea_pr-'+data.__style.__padding_right,
'ea_pl-'+data.__style.__padding_left,
'ea_pt-'+data.__style.__padding_top,
'ea_pb-'+data.__style.__padding_bottom,


'ea_scale-'+data.size,
  ]"
>aaa</v-switch>
  `,  
  data() {
      return {
        data:{
            size:"",
        }
      };
  },
  methods:{
    
    // handleClick() {
    //     this.$emit('click');
    //   }
  },
  mounted:function(){
  }
  }
  );
  // 
  


 
  Vue.component2('a_1_1_2_5_1', {
    template: `
<v-slider

:class="[
  
'ea_m-'+data.__style.__margin,
'ea_mx-'+data.__style.__margin_x,
'ea_my-'+data.__style.__margin_y,
'ea_mr-'+data.__style.__margin_right,
'ea_ml-'+data.__style.__margin_left,
'ea_mt-'+data.__style.__margin_top,
'ea_mb-'+data.__style.__margin_bottom,
'ea_p-'+data.__style.__padding,
'ea_px-'+data.__style.__padding_x,
'ea_py-'+data.__style.__padding_y,
'ea_pr-'+data.__style.__padding_right,
'ea_pl-'+data.__style.__padding_left,
'ea_pt-'+data.__style.__padding_top,
'ea_pb-'+data.__style.__padding_bottom,
  ]"
></v-slider>
  `,  
  data() {
      return {
        data:{
            value:'BUTTON',
            size:"medium",
            text:true,
            color:'primary',
            disabled:false,
        }
      };
  },
  methods:{
    
    handleClick() {
        this.$emit('click');
      }
  },
  mounted:function(){
  }
  }
  );
  // 
  
window.a_1_3_1_1_1_dom=null;//表示菜单的dom
window.a_1_3_1_1_1_vue=null;//表示菜单的dom
window.a_1_3_1_1_1_show_menu=function(obj){

let x=null;
let y=null;
if(obj.event){
    x=obj.event.clientX;
    y=obj.event.clientY;
}else{
    x=obj.x;
    y=obj.y;
}
let deepcopy_data={"menu_dct":obj.menu_dct,'keys':Object.keys(obj.menu_dct).sort(),x:x,y:y}
//如果菜单不存在则创建一个菜单
if(!a_1_3_1_1_1_dom){
let new_dom=document.createElement('a_1_3_1_1_1_menu');
//设置dom属性 ref值为ref_obj
new_dom.setAttribute('ref','ref_obj');
new_dom.setAttribute(':deepcopy_data','deepcopy_data');
//设置vue
let vue_dct={'el':new_dom,data:{true:true,false:false,null:null,deepcopy_data:deepcopy_data}};
// 将这个 div 添加到 document.documentElement（即 <html> 元素）  
document.documentElement.appendChild(new_dom);
//渲染vue组件
window.a_1_3_1_1_1_vue=new Vue(vue_dct);
window.a_1_3_1_1_1_dom=new_dom;
document.addEventListener('click', function(event) {
    // Check if the clicked element is not doma and not a descendant of doma
    if (!window.a_1_3_1_1_1_vue.$refs.ref_obj.$el.contains(event.target)) {
        window.a_1_3_1_1_1_vue.$refs.ref_obj.show_flag=false;
    }
});
}else{
    window.a_1_3_1_1_1_vue.$refs.ref_obj.data.keys=Object.keys(obj.menu_dct).sort();
    window.a_1_3_1_1_1_vue.$refs.ref_obj.data.menu_dct=obj.menu_dct;
    window.a_1_3_1_1_1_vue.$refs.ref_obj.data.x=x;
    window.a_1_3_1_1_1_vue.$refs.ref_obj.data.y=y;
    window.a_1_3_1_1_1_vue.$refs.ref_obj.data.refresh();
    window.a_1_3_1_1_1_vue.$refs.ref_obj.show_flag=true;

}

}


Vue.component2('a_1_3_1_1_1_menu', {  
    template: `
       
        <div class="a_1_3_1_1_1_sub_menu" :style="lefttop" :key='refresh' v-show='show_flag'>
            <div class="a_1_3_1_1_1_sub_menu_item" ref="text"v-for="(key,indexr) in data.keys" @click="click($event,key)">
                {{data.menu_dct[key].text}}
            </div>
        </div>
`,
data(){
    return{
        show_flag:true,
        refresh:'1',
        lefttop:'color:red',
        data:{
            menu_dct:{
            },
            keys:{},
            x:'33',
            y:'33',
        }
    }
},
watch:{
    
    "data.x":function(e){
        this.lefttop=`left:${this.data.x};top:${this.data.y};`
    },
    "data.y":function(e){
        this.lefttop=`left:${this.data.x};top:${this.data.y};`
    },
},
methods:{
    
    click:function(event,key){
        this.data.menu_dct[key].click(event);
        this.show_flag=false;
    },
},

mounted:function(){
_this.data.refresh=function(){_this.refresh='2'?'1':'2'};
_this.data.keys=_this.deepcopy_data.keys;
_this.data.x=_this.deepcopy_data.x;
_this.data.y=_this.deepcopy_data.y;
_this.data.menu_dct=_this.deepcopy_data.menu_dct;_this.data.refresh();
}

})

// a_1_3_1_1_1_show_menu(
// {
//     menu_dct:{
//         '0':{
//             'text':"删除",
//             'click':function(){console.log("???");
//},
//         },
//         '1':{
//             'text':"查看",
//             'click':function(){console.log("2???");
//},
//         },
//     },
//     x:444,y:444,
// }
// )

// a_1_3_1_1_1_show_menu(
// {
//     menu_dct:{
//         '0':{
//             'text':"3删除",
//             'click':function(){console.log("???");
//},
//         },
//         '1':{
//             'text':"4查看",
//             'click':function(){console.log("2???");
//},
//         },
//     },
//     event:{clientX:333,clientY:555}
// }
// )

window.a_1_3_1_2_1_line_dct={};
window.a_1_3_1_2_1_line_add=function(obj){
let father_dom=obj.father_dom||obj._this.$refs[obj.father_ref];
//新建一个dom
let new_dom=document.createElement('a_1_3_1_2_1_line');
//设置dom属性 ref值为ref_obj
new_dom.setAttribute('ref','ref_obj');
//设置vue
let vue_dct={'el':new_dom,data:{true:true,false:false,null:null}};
//设置vue传入参数
new_dom.setAttribute(':deepcopy_data',"deepcopy_data");vue_dct.data.deepcopy_data={xy:JSON.stringify(obj.xy)};
//插入dom
father_dom.appendChild(new_dom);  
//渲染vue组件
let new_vue=new Vue(vue_dct);
//获取到刚才渲染的vue对象
let new_vue2=new_vue.$refs.ref_obj;
//加入快速访问中
if(obj.key){window.a_1_3_1_2_1_line_dct[obj.key]={'dom':new_dom,"vue":new_vue2,'father_dom':father_dom}}

}

window.a_1_3_1_2_1_line_del=function(key){
window.a_1_3_1_2_1_line_dct[key].father_dom.removeChild(window.a_1_3_1_2_1_line_dct[key].vue.$el);
delete window.a_1_3_1_2_1_line_dct[key];
}
Vue.component2('a_1_3_1_2_1_line', {  
    template: `
       
   <div style="height:100%" :refresh="refresh">

        <svg v-if='data.line1_flag' :style="data.line1"
            class="a_1_3_1_2_1_b2" stroke-width="6">
                <path :d="data.line1_d" 
                    stroke="#0096f2"fill="#0096f2" stroke-width="6">
                </path>
        </svg>
        
        <svg v-if='data.line2_flag':style="data.line2"
            class="a_1_3_1_2_1_b2" stroke-width="6">
                <path :d="data.line2_d" 
                    stroke="#0096f2"fill="#0096f2" stroke-width="6">
                </path>
        </svg>
        
        <svg v-if='data.line3_flag' :style="data.line3"  
            class="a_1_3_1_2_1_b2" stroke-width="6">
                <path :d="data.line3_d" 
                    stroke="#0096f2"fill="#0096f2" stroke-width="6">
                </path>
        </svg>
        
        <svg v-if='data.line4_flag' :style="data.line4"
            class="a_1_3_1_2_1_b2" stroke-width="6">
                <path :d="data.line4_d" 
                    stroke="#0096f2"fill="#0096f2" stroke-width="6">
                </path>
        </svg>
        
        <svg v-if='data.line5_flag' :style="data.line5"
            class="a_1_3_1_2_1_b2" stroke-width="6">
                <path :d="data.line5_d" 
                    stroke="#0096f2"fill="#0096f2" stroke-width="6">
                </path>
        </svg>
    </div>
`,
data(){
    return{
        show_flag:true,
        refresh:'1',
        lefttop:'color:red',
        data:{
            xy:'',
            line1_flag:true,
            line2_flag:false,
            line3_flag:false,
            line4_flag:false,
            line5_flag:false,
            line1:'',
            line2:'',
            line3:'',
            line4:'',
            line5:'',
            line1_d:'',
            line2_d:'',
            line3_d:'',
            line4_d:'',
            line5_d:'',
        }
    }
},
watch:{
    'data.xy':function(e){
        e=JSON.parse(e);
        this.set_line2(e);
    },
},
methods:{
    set_line:function(dct){
      let x_offset=Math.abs(dct.x1-dct.x2);
      //如果end在start正下方
      if (x_offset<5 && dct.y2>dct.y1){return 0}
      //如果end在start左下方
      else if(dct.x1>=dct.x2 && dct.y2>dct.y1){return 1}
      //如果end在start右下方
      else if(dct.x1<=dct.x2 && dct.y2>dct.y1){return 2}
      //如果end在start上方
      else if(x_offset<5 && dct.y2<=dct.y1){return 3}
      //如果end在start左上方
      else if(dct.x1>=dct.x2 && dct.y2<=dct.y1){return 4}
      //如果end在start右上方
      else if(dct.x1<=dct.x2&& dct.y2<=dct.y1){return 5}
      else if((dct.x1==dct.x2) &&(dct.y1==dct.y2)){return 0}
    },
    
    set_line2:function(dct){
        let x1=dct.x1,y1=dct.y1,x2=dct.x2,y2=dct.y2;
        let k=this.set_line(dct);
        //如果end在start正下方
        if       (k==0){
            this.data.line1=`left: ${x1+4.5}px;top:${y1+1+4}px;height: ${y2-y1+5}px;width:${3}px;`;
            this.data.line1_d="M 0 0 L 0 "+(y2-y1)+" ";
            this.data.line2_flag=false;
            this.data.line3_flag=false;
            this.data.line4_flag=false;
            this.data.line5_flag=false;
            this.data.refresh();
        //如果end在start左下方
        }else if(k==1){
            this.data.line1=`left: ${x1+4.5}px;top:${y1+1+4}px;height: ${(y2-y1)/2+5}px;width:${3}px;`;
            // this.data.line2=`left: ${x2+4.5}px;top:${y1+(y2-y1)/2+5}px;height: ${3}px;width:${x1-x2+33}px;cursor:s-resize;`;
            this.data.line2=`left: ${x2+4.5}px;top:${y1+(y2-y1)/2+5}px;height: ${3}px;width:${x1-x2+33}px;`;
            this.data.line3=`left: ${x2+4.5}px;top:${y1+(y2-y1)/2+5}px;height: ${(y2-y1)/2+5}px;width:${3}px;`;
            this.data.line1_d="M 0 0 L 0 "+((y2-y1)/2+2)+" ";
            this.data.line2_d=`M 0 0 L ${x1-x2+3} 0`;
            this.data.line3_d="M 0 0 L 0 "+((y2-y1)/2+7)+" ";
            this.data.line2_flag=true;
            this.data.line3_flag=true;
            this.data.line4_flag=false;
            this.data.line5_flag=false;
            this.data.refresh();
        //如果end在start右下方
        }else if(k==2){
            this.data.line1=`left: ${x1+4.5}px;top:${y1+1+4}px;height: ${(y2-y1)/2+5}px;width:${3}px;`;
            // this.data.line2=`left: ${x1+4.5}px;top:${y1+(y2-y1)/2+5}px;height: ${3}px;width:${x2-x1+5}px;cursor:s-resize;`;
            this.data.line2=`left: ${x1+4.5}px;top:${y1+(y2-y1)/2+5}px;height: ${3}px;width:${x2-x1+5}px;`;
            this.data.line3=`left: ${x2+4.5}px;top:${y1+(y2-y1)/2+5}px;height: ${(y2-y1)/2+5}px;width:${3}px;`;
            this.data.line1_d="M 0 0 L 0 "+((y2-y1)/2+2)+" ";
            this.data.line2_d=`M 0 0 L ${x2-x1+3} 0`;
            this.data.line3_d="M 0 0 L 0 "+((y2-y1)/2+7)+" ";
            this.data.line2_flag=true;
            this.data.line3_flag=true;
            this.data.line4_flag=false;
            this.data.line5_flag=false;
            this.data.refresh();
        //如果end在start上方
        }else if(k==3){
            this.data.line1=`left: ${x1+4.5}px;top:${y2-35}px;height: ${(y1-y2)+10+70}px;width:${3}px;`;
            this.data.line1_d=`M 0 0 L 0 ${y1-y2+70}`;
            this.data.line2_flag=false;
            this.data.line3_flag=false;
            this.data.line4_flag=false;
            this.data.line5_flag=false;
            this.data.refresh();
        //如果end在start左上方
        }else if(k==4){
            this.data.line1=`left: ${x1+4.5}px;top:${y1+1+4}px;height: ${37}px;width:${3}px;`;
            this.data.line2=`left: ${x1-(x1-x2)/2+4.5}px;top:${y1+35}px;height: ${3}px;width:${(x1-x2)/2+7}px;`;
            // this.data.line3=`left: ${x1-(x1-x2)/2+4.5}px;top:${y2-35}px;height: ${70+y1-y2}px;width:${10}px;cursor:w-resize;`;
            this.data.line3=`left: ${x1-(x1-x2)/2+4.5}px;top:${y2-35}px;height: ${70+y1-y2}px;width:${10}px;`;
            this.data.line4=`left: ${x2+4.5}px;top:${y2-35}px;height: ${3}px;width:${(x1-x2)/2+7}px;`;
            this.data.line5=`left: ${x2+4.5}px;top:${y2-35}px;height: ${55}px;width:${3}px;`;
            this.data.line1_d="M 0 0 L 0 32";
            this.data.line2_d=`M 0 0 L ${(x1-x2)/2+3} 0`;
            this.data.line3_d=`M 0 0 L 0 ${y1-y2+77}`;
            this.data.line4_d=`M 0 0 L ${(x1-x2)/2+3} 0`;
            this.data.line5_d="M 0 0 L 0 44";
            this.data.line2_flag=true;
            this.data.line3_flag=true;
            this.data.line4_flag=true;
            this.data.line5_flag=true;
            this.data.refresh();
        //如果end在start右上方
        }else if(k==5){
            this.data.line1=`left: ${x1+4.5}px;top:${y1+1+4}px;height: ${37}px;width:${3}px;`;
            this.data.line2=`left: ${x1+4.5}px;top:${y1+35}px;height: ${3}px;width:${(x2-x1)/2+7}px;`;
            // this.data.line3=`left: ${x1+(x2-x1)/2+4.5}px;top:${y2-35}px;height: ${70+y1-y2}px;width:${10}px;cursor:w-resize;`;
            this.data.line3=`left: ${x1+(x2-x1)/2+4.5}px;top:${y2-35}px;height: ${70+y1-y2}px;width:${10}px;`;
            this.data.line4=`left: ${x1+(x2-x1)/2+4.5}px;top:${y2-35}px;height: ${3}px;width:${(x2-x1)/2+7}px;`;
            this.data.line5=`left: ${x2+4.5}px;top:${y2-35}px;height: ${55}px;width:${3}px;`;
            this.data.line1_d="M 0 0 L 0 32";
            this.data.line2_d=`M 0 0 L ${(x2-x1)/2+3} 0`;
            this.data.line3_d=`M 0 0 L 0 ${y1-y2+77}`;
            this.data.line4_d=`M 0 0 L ${(x2-x1)/2+3} 0`;
            this.data.line5_d="M 0 0 L 0 44";
            this.data.line2_flag=true;
            this.data.line3_flag=true;
            this.data.line4_flag=true;
            this.data.line5_flag=true;
            this.data.refresh();
        }
    },
},

mounted:function(){
_this.data.refresh=function(){_this.refresh='2'?'1':'2'}
_this.data.menu_dct=_this.deepcopy_data.menu_dct;_this.data.refresh();
}

})

Vue.component2('a_1_4_1_1_1', {  
    template: `
<div class="container">
<div class="styled-div" style="height: 300px;top: 215px;margin-left: 1px;z-index: 999;"></div>
<div class="styled-div" style="height: 300px;top: 215px;margin-left: 1px;position: absolute;background: rgb(204 232 248);"></div>
<svg width="210" height="110" style="stroke: rgb(0 173 255);top: 214px;z-index: 2000;position: absolute;">
    <ellipse style="stroke: rgb(0 173 255);"cx="101" cy="51" rx="100" ry="50" stroke="#0078d4" stroke-width="1" fill="none"></ellipse></svg>
<svg width="210" height="110" style="stroke: rgb(0 173 255);top: 314px;z-index: 2000;position: absolute;">
    <ellipse style="stroke: rgb(0 173 255);" cx="101" cy="51" rx="100" ry="50" stroke="#0078d4" stroke-width="1" fill="none"></ellipse></svg>
    <div style="
    position: absolute;
    z-index: 9999;
    font-size: 44px;
    color: #1270f3;
    margin-left: 50;
    top: 333;
">3.3m</div>
<div class="styled-div" style="top: 315px;margin-left: 1px;position: absolute;height: 200px;border-radius: 50% / 25%;background: linear-gradient(to right, rgb(200, 224, 238) 0%, rgb(153, 197, 233) 20%, rgb(95, 145, 205) 40%, rgb(110, 160, 220) 60%, rgb(160, 200, 235) 80%, rgb(200, 224, 238) 100%);"></div>

</div>


`,
data(){
    return{
        show_flag:true,
        data:{
            max_val:200,//最大值
            now_val:100,//当前值
            size:1,//比例
            width:300,
            height:300,
        }
    }
},
watch:{

},
methods:{
}
,
mounted:function(){

}


})

